-
Notifications
You must be signed in to change notification settings - Fork 48
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
Error while apply() inside match #309
Comments
We need a guard against recursion deadlock. |
Another example https://goo.gl/EbKDW3 |
@golyshevd thank you. In current bem-xjst you can not use |
@miripiruni why not? is it feature? ) |
@golyshevd it happened :) I’ll try to fix it. |
@miripiruni Thanks! |
Guys, let's resurrect this issue. We encountered this problem again. |
@remnev can you show your usecase please? |
block('foo')(
mode('is-empty')(true),
content()(
match(() => !apply('is-empty'))('text')
)
); |
For example, I have a mode, which returns some data or nothing. Depends on it I want to output different content. // one case: returns "text"
block('foo')(
mode('is-empty')(true),
content()(
'–',
match(() => apply('is-empty'))('text')
)
);
// another case: returns "–"
block('foo').mod('a', 'b')(
mode('is-empty')(false)
); |
@remnev thanks. |
I don't think that it is good pattern but when you try to use apply inside match u get an Error:
example
Maybe we need to handle this error and continue to process template, or fix this.
The text was updated successfully, but these errors were encountered: