From b5c8dcb2713434ecb37c6721945b7b0997530a72 Mon Sep 17 00:00:00 2001 From: Steve Pieper Date: Mon, 6 May 2024 16:42:11 -0400 Subject: [PATCH] fix(syntax): fix type checking for Array and ArrayBuffer --- examples/vtkDisplay/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vtkDisplay/index.html b/examples/vtkDisplay/index.html index ee21e7a1..3244d879 100644 --- a/examples/vtkDisplay/index.html +++ b/examples/vtkDisplay/index.html @@ -451,8 +451,8 @@

Volume:

// a vtkVolume (actor) ready to render // function part10ToVolumeActor(part10) { - part10 = typeof part10 == "Array" ? part10[0] : part10; - if (typeof part10 != "ArrayBuffer") { + part10 = Array.isArray(part10) ? part10[0] : part10; + if (!ArrayBuffer.isView(part10) { console.error("Invalid part10 binary retrieved", part10); return; }