fix crash when the walker didnt match because n will be null
This commit is contained in:
parent
ac6a0e7667
commit
cdc7d3ffe6
@ -83,7 +83,7 @@ export class YXmlTreeWalker {
|
||||
* @type {Item|null}
|
||||
*/
|
||||
let n = this._currentNode
|
||||
let type = /** @type {any} */ (n.content).type
|
||||
let type = /** @type {any} */ n && n.content && (n.content).type
|
||||
if (n !== null && (!this._firstCall || n.deleted || !this._filter(type))) { // if first call, we check if we can use the first item
|
||||
do {
|
||||
type = /** @type {any} */ (n.content).type
|
||||
|
Loading…
x
Reference in New Issue
Block a user