Closed albb0920 closed 5 years ago
Hi, another thing I find is that the expression is evaluated on every iteration. Do you want a separate PR or I should add this commit here.
https://github.com/albb0920/pug-vdom/commit/e9d024936b96402ba7e150c130af95a3d9200184
@albb0920 thanks for contributing! I will try to get around to merging this and publish a new version tomorrow.
Please do a separate pull request for the other fix, as I find it's best to keep PRs atomic
OK, I've opened another PR, thank you!
@batiste Rebased, thank you!
Hi
I've noticed when using
for...in
loop,this
is changed inside the loop due to the use of forEach. The official implementation does intentionally preservethis
.https://github.com/pugjs/pug/blob/pug%402.0.3/packages/pug-code-gen/index.js#L767
Thank you!