brianmhunt / knockout-fast-foreach

Foreach. Faster. For Knockout.
MIT License
59 stars 18 forks source link

Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node' #5

Closed AdamWillden closed 9 years ago

AdamWillden commented 9 years ago

Using 0.2.

I have a page by option which if I lower (pag by 15 to page by 5 - removing last 10 items from the currrent collection) I get an exception Uncaught TypeError: Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'..

This line returns undefined trying to access index [134] of 134 items: https://github.com/brianmhunt/knockout-fast-foreach/blob/master/dist/knockout-fast-foreach.js#L145

If I need to supply more details let me know.

brianmhunt commented 9 years ago

Thanks Adam. This would seem to be an off-by-one error. Any chance you could post a jsFiddle or jsBin that illustrates? (Here's a sample jsfiddle from #2 that could be a good base.) I can't glean exactly where the problem stems from just from the description.

Cheers

AdamWillden commented 9 years ago

http://jsfiddle.net/zfqj5rb7/ :-)

brianmhunt commented 9 years ago

This looks fixed too - same as #5.

Thanks so much @AdamWillden – definitely would not have progressed as far on this plugin today without all your feedback. Very sincerely appreciated.

:beers: