Closed tadatuta closed 9 years ago
@tadatuta def()
mode is required to return string now. It works in completely different way internally, and there was no such requirement in 1.x version.
See: https://github.com/bem/bem-xjst/wiki/Notable-changes-between-bem-xjst@1.x-and-bem-xjst@2.x for more info.
@indutny will additional check for undefined
to return empty sting for such case do any harm?
@tadatuta it might.
block('b1').def()(function() {
applyNext();
});
Will return empty string instead of applyNext()
result. I think it is probably better to require users to return string value. This way we will be sure that everyone has caught up to our changes.
Sounds reasonable, thanks!
Guess, it could and should be linted. Can't agree that this decision was right.
For BEMJSON
{ block: 'b1' }
andwith
bem-xjst 1.x
results in an empty string and withbem-xjst 2.x
in'undefined'
.That's not a big issue but if it's easy to fix on
bem-xjst
side I think it'd be convenient.// cc @indutny @veged