bem / bem-xjst

bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
https://bem.github.io/bem-xjst
Other
116 stars 48 forks source link

[1.x] reapply() drops this.mods #97

Closed tadatuta closed 9 years ago

tadatuta commented 9 years ago

Only bem-xjst@1.x in production mode affected.

// BEMJSON
{
    block: 'test',
    mods: {hello: 'world'}
}

// BEMHTML
block('test').content()(function() {
    console.log(this.mods); // { hello: 'world' }
    this.reapply(); // same result with any argument here
    console.log(this.mods); // undefined
});
indutny commented 9 years ago

See https://github.com/bem/bem-core/pull/1224

arikon commented 9 years ago

@tadatuta Could you make review?

tadatuta commented 9 years ago

Fixed in bem-core