-
Notifications
You must be signed in to change notification settings - Fork 12
Warn when closing magic tag is missed #678
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
Conversation
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.
Please try removing the if
predicate referenced in the inline comments, and if it passes testing, commit the change.
can-stache.js
Outdated
// warn if closing magic tag is missed #675 | ||
var last = state.sectionElementStack[state.sectionElementStack.length - 1]; | ||
if (process.env.NODE_ENV !== 'production') { | ||
if(section instanceof HTMLSectionBuilder) { |
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 don't think you need this line here. The block you copied this from (probabaly makeRendererAndUpdateSection
) was in a function that was passed section
as a parameter. In this function you're just referencing the top level section
, which is always an HTMLSectionBuilder
.
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.
Yeah, I added this check in the 2nd commit the first one was good.
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.
is fixed now
Update testee to the latest version 🚀
* Handle nested call functions Allows use of returning functions from functions * Include stache test for nested call expression
This fixes the memory leak in the portal helper. The problem was that we were never unregistering the call to `domMutate.onNodeRemoval` so there was always a pointer to the MutationObserver that is observing the document. This adds a page in `benchmark/portal-mem.html` that can be used to find memory leaks. Fixes #684
Fix memory leak in portal helper
Use can-dom-data instead of can-dom-data-state
add documentation for data helper
can-stache.js
Outdated
done: function(lineNo){ | ||
//!steal-remove-start | ||
// warn if closing magic tag is missed #675 | ||
var last = state.sectionElementStack[state.sectionElementStack.length - 1]; |
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.
move this inside
I close this for #692 |
This adds warning when a closing magic tag is missed for example the following triggers a warning:
{{# let foo="bar"}} {{foo}}
The changes:
The warning is added to done function
Fixes #675