From 58b1fb8de5fc91ac866ce478e96a9b42c5ec877a Mon Sep 17 00:00:00 2001 From: MikeCAT Date: Wed, 2 Nov 2022 08:29:26 +0900 Subject: [PATCH] ViewBitPlane.mjs: use byteLength instead of length to check validity of ArrayBuffer --- src/core/operations/ViewBitPlane.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/operations/ViewBitPlane.mjs b/src/core/operations/ViewBitPlane.mjs index 859e6868..e1e5f6df 100644 --- a/src/core/operations/ViewBitPlane.mjs +++ b/src/core/operations/ViewBitPlane.mjs @@ -90,7 +90,7 @@ class ViewBitPlane extends Operation { * @returns {html} */ present(data) { - if (!data.length) return ""; + if (!data.byteLength) return ""; const type = isImage(data); return ``;