-
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
apply(modeName)
must return values from this.ctx
if no other templates
#255
Conversation
f3b2df8
to
f7f6225
Compare
cdff1ab
to
6bc036b
Compare
Updated! |
if (ctxJS !== true) | ||
js = utils.extend(ctxJS, js); | ||
} else if (ctxJS === true) { | ||
js = {}; | ||
} else { | ||
js = ctxJS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Because of this.js.exec(context) now returns this.ctx.js
by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I'd put totalMix into separate commit, all the rest is LGTM |
@zxqfox separate commit or PR? |
:-D Commit will be enough to me. |
@zxqfox actually, |
May I merge? |
@@ -18,8 +18,8 @@ function Entity(bemxjst, block, elem, templates) { | |||
this.canFlush = true; | |||
|
|||
// "Fast modes" | |||
this.def = new Match(this); | |||
this.content = new Match(this); | |||
this.def = new Match(this, 'def'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zxqfox it looks like not necessary, you’re right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zxqfox updated.
a9be96a
to
48394cf
Compare
ping |
this.cls = new Match(this); | ||
this.tag = new Match(this, 'tag'); | ||
this.attrs = new Match(this, 'attrs'); | ||
this.mod = new Match(this, 'mod'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't noticed before, what the purpose of this? There is no mod
property in bemjson
as well as mod
with template body. We have block('a').mod('m', 'v')(body)
but not block('a').mod()(body)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zxqfox agree. Thank you. 'mod'
removed.
Not sure what the |
48394cf
to
5460128
Compare
91df62b
to
9d230c5
Compare
Fix for #236
Benchmarks test results within the error: (+/– 1% in different bundles).