Exception is thrown when selecting a node that has been inserted into the treeview's data array at the beginning of the array.
Notably, the error does not occur if you insert at the end of the array.
The side effect of this exception is that item is null when nodeClick.emit is ran, so any event handlers that use item will fail.
Line 360 in treeview.component.js:
_this.nodeClick.emit({
item: lookup.item, // <-- lookup == null
originalEvent: e,
type: e.type
});
Expect no exception to be thrown when selecting a node.
https://stackblitz.com/edit/angular-gpaaue
Package versions:
Reproducible on TreeView demo
Browser:
System:
Reproducible on Stackblitz
Fixed in latest dev version.