-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Each iteration over sparse arrays incorrectly executes on deleted entries #1065
Comments
I'm not clear what your issue is here and a live example would help us debug this in a much better fashion. Please create a jsfiddle showing us the unexpected behavior. The contributing doc links to a template that can be used for this. |
finally haha |
Thanks for the fiddle, it looks like we are iterating over sparse arrays incorrectly. We need to check to see the field exists prior to running it as an undefined context is not supported (outside of javascript strict mode). Will be fixed in the next release. |
handlebars-lang#1227 [undefined, undefined] should have the same behavior as new Array(2), per handlebars-lang#1065
handlebars-lang#1227 [undefined, undefined] should have the same behavior as new Array(2), per handlebars-lang#1065
I got an arraydata like this { rocords:[{Number:'1',Name:'test1'},{Number:'2',Name:'test2},{Number:'3',Name:'test3}] };
registerHelper like this
Handlebars.registerHelper('link', function (options) {
return '
' + options.fn(this) + this.Name +'
';});
I delete array[1];
when registerHelper execute array[1], 'this' ponit window.
Its something wrong?
The text was updated successfully, but these errors were encountered: