From 249c4f9c459956f75b8534a5ec0a78c2f6d9fdbf Mon Sep 17 00:00:00 2001
From: Jeff Haynie <jhaynie@pinpoint.com>
Date: Thu, 1 Apr 2021 14:59:34 -0500
Subject: [PATCH] switch order for type to get picked up

---
 src/types/YXmlFragment.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js
index 6fc0564e..6aa78bcd 100644
--- a/src/types/YXmlFragment.js
+++ b/src/types/YXmlFragment.js
@@ -83,7 +83,7 @@ export class YXmlTreeWalker {
      * @type {Item|null}
      */
     let n = this._currentNode
-    let type = /** @type {any} */ n && n.content && (n.content).type
+    let type = n && n.content && /** @type {any} */ (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