From c23d0b1b38fae68d8c859232f235e3b0ce7dcbc8 Mon Sep 17 00:00:00 2001 From: Holger Seelig Date: Fri, 20 Sep 2024 18:44:56 +0200 Subject: [PATCH] Fixed fatal bug if a node is null. --- src/Application/Traverse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Application/Traverse.js b/src/Application/Traverse.js index 516a2713..3dde5ea1 100644 --- a/src/Application/Traverse.js +++ b/src/Application/Traverse.js @@ -16,7 +16,7 @@ module .exports = class Traverse static PROTOTYPE_INSTANCES = flags <<= 1; static INLINE_SCENE = flags <<= 1; static ALL = (flags << 1) - 1; - + /** * * @param {X3DScene|X3DExecutionContext|MFNode|Array|SFNode} object @@ -353,7 +353,7 @@ module .exports = class Traverse case X3D .X3DConstants .MFNode: { for (const node of field) - this .findInNode (node .getValue (), object, flags, hierarchies, hierarchy, seen); + this .findInNode (node ?.getValue (), object, flags, hierarchies, hierarchy, seen); break; }