"Cannot read property '0' of undefined" on repeated Vector.appendAll
See original GitHub issueThis code:
import { Vector } from 'prelude.ts';
let v = Vector.ofIterable(Array(15).fill(1));
for (let i = 0; i < 100; i += 1) {
console.log(i);
v = v.appendAll(Array(1000).fill(1));
}
Will fail after 86 iterations with:
TypeError: Cannot read property '0' of undefined
at Vector.getLastNode (node_modules/prelude.ts/src/Vector.ts:279:31)
at Vector.appendAllArrays (node_modules/prelude.ts/src/Vector.ts:457:34)
at Vector.appendAll (node_modules/prelude.ts/src/Vector.ts:419:25)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Fix: Cannot Read Property '0' of Undefined - Coding Beauty
The “cannot read property '0' of undefined” error occurs when you try to access the 0 index of an array-like variable, but the...
Read more >Cannot read property '0' of undefined - Stack Overflow
It seems you have an array of objects and each object has a brands property that contains an array of objects. Your second...
Read more >ArrayBase in ndarray - Rust - Docs.rs
An n-dimensional array. The array is a general container of elements. The array supports arithmetic operations by applying them elementwise, if the elements ......
Read more >ميډياويکي:Vector-opt-out - ويکيپېډيا
Detect buggy property enumeration order in older V8 versions. ... if (!condition) { var error = void 0; if (format === undefined) {...
Read more >LSSTApplications: lsst::daf::base::PropertySet Class Reference
Append all value vectors from the source to their corresponding properties. Sets values if a property does not exist. If a property already...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Well, I’m using it in a production system, so that tends to find all the edge cases! 😃
I released 0.7.13 with the fix! Thank you for the patience and the detailed bug reports!