Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw on apply undefined modes #487

Closed
qfox opened this issue Oct 25, 2017 · 1 comment
Closed

Throw on apply undefined modes #487

qfox opened this issue Oct 25, 2017 · 1 comment

Comments

@qfox
Copy link
Member

qfox commented Oct 25, 2017

Input code or something about issue background

Since: 9d230c5
Because of: https://github.com/bem/bem-xjst/blob/master/lib/bemxjst/index.js#L519

https://goo.gl/2Nx5M1

[{
    block: 'test',
    cols: ['a', 'b']
}];
block('test')(
    content()(() => apply('cols')
        .map(c => ({ block: c }))))

Expected Behavior

Unknown mode exception

Actual Behavior

<div class="test">
    <div class="a"></div>
    <div class="b"></div>
</div>

Possible Solution

Throw somewhere here: https://github.com/bem/bem-xjst/blob/master/lib/bemxjst/index.js#L519

Your Environment

Current master

miripiruni added a commit that referenced this issue Oct 26, 2017
Docs: apply mode without templates (fix for #487)
@miripiruni
Copy link
Contributor

Fixed in #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants