Skip to content

Fix setVar not working in each#805

Merged
255kb merged 1 commit intomainfrom
fix/793-setvar-each
Aug 25, 2022
Merged

Fix setVar not working in each#805
255kb merged 1 commit intomainfrom
fix/793-setvar-each

Conversation

@255kb
Copy link
Member

@255kb 255kb commented Aug 25, 2022

Revert to using options.data instead of this or root due to incompatibility between Handlebars' each implementation and repeat. Now all variables are scoped and available by using @.
Closes #793

Technical implementation details

Checklist

  • data migration added (@mockoon/commons)
  • data migration automated tests added (@mockoon/commons)
  • CLI automated tests added (@mockoon/cli)
  • desktop automated tests added (@mockoon/desktop)

Revert to using `options.data` instead of `this` or `root` due to incompatibility between Handlebars' `each` implementation and `repeat`. Now all variables are scoped and available by using `@`.
Closes #793
@255kb 255kb merged commit 8428df9 into main Aug 25, 2022
@255kb 255kb deleted the fix/793-setvar-each branch August 25, 2022 09:27
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.

setVar doesn't work within #each

1 participant