From 80c052c526d2fc622e45706cb93230818ccbc06b Mon Sep 17 00:00:00 2001 From: Jason11Q <127638883+Jason11Q@users.noreply.github.com> Date: Thu, 1 Jun 2023 18:05:49 +0800 Subject: [PATCH] Update stackblur.js delete all mark. --- src/stackblur.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/stackblur.js b/src/stackblur.js index 8baa6a6..b79d2ce 100644 --- a/src/stackblur.js +++ b/src/stackblur.js @@ -95,8 +95,7 @@ function processImage ( if (typeof img === 'string') { img = document.getElementById(img); } - - // FIXED: JC change condition + if (!img || (Object.prototype.toString.call(img).slice(8, -1) === 'HTMLImageElement' && !('naturalWidth' in img))) { return; } @@ -105,7 +104,7 @@ function processImage ( const w = img[dimensionType + 'Width']; const h = img[dimensionType + 'Height']; - // FIXED: JC add ImageBitmap support,can blur texture source + // add ImageBitmap support,can blur texture source if (Object.prototype.toString.call(img).slice(8, -1) === 'ImageBitmap') { w = img.width; h = img.height;