Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nelsonihc
Copy link
Contributor

Hi, this fixes the use case described in #44

I appreciate your feedback in this regard!

src/index.js Outdated
options.expressions.locals = merge(options.expressions.locals, locals);
options.plugins.push(expressions(options.expressions));

var options_expressions = merge(options.expressions, {locals});
Copy link
Member

Choose a reason for hiding this comment

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

  1. Not very clear about the purpose of just such a merger?
    This will cost more than the current merger
  2. var ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the merge is really suboptimal, and after testing it was proven unecessary. the new variable is not needed.

src/index.js Outdated
options.plugins.push(expressions(options.expressions));

var options_expressions = merge(options.expressions, {locals});
var plugins = [...options.plugins, expressions(options_expressions)];
Copy link
Member

Choose a reason for hiding this comment

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

  1. var ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😊 sorry, I've no experience in JS, I've educaded myself a little more on scoping. fixed.

@Scrum Scrum linked an issue Dec 7, 2021 that may be closed by this pull request
@Scrum Scrum merged commit 460db75 into posthtml:master Dec 7, 2021
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.

nested extends locals are not working

2 participants