Skip to content

Conversation

heenakwag
Copy link
Member

  • Maintain the outer context

Before (v2.1.0)

var source = '{{each doubleArr}}{{each @this}}{{@index}}{{/each}}{{/each}}';
var context = {
  doubleArr: [[1, 2, 3], [4, 5, 6]]
};
console.log(template(source, context)); // ''
// @this in the inner each is undefined because outer context was not applied.

After (v2.1.1)

var source = '{{each doubleArr}}{{each @this}}{{@index}}{{/each}}{{/each}}';
var context = {
  doubleArr: [[1, 2, 3], [4, 5, 6]]
};
console.log(template(source, context)); // '012012'


if (source.indexOf('elseif') > -1 || source === 'else') {
// eslint-disable-next-line complexity
forEach(sourcesInsideBlock, function(source, index) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source는 문자열 값인거죠??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!

Copy link
Member

@seonim-ryu seonim-ryu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[12/6] 이견 없습니다. :)

Copy link
Member

@jung-han jung-han left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이견 없습니다!

@heenakwag heenakwag changed the base branch from feat/bracket-notation-with-quotes to master December 11, 2019 22:52
@heenakwag heenakwag force-pushed the fix/maintain-outer-context branch from a672dd9 to bf1706a Compare December 11, 2019 23:05
@heenakwag heenakwag merged commit ae9588d into master Dec 11, 2019
@heenakwag heenakwag deleted the fix/maintain-outer-context branch December 11, 2019 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants