From 739a1cf17106ea18ea4fedf10a3cfb2dc1220cb6 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Mon, 24 Oct 2022 22:35:04 -0400 Subject: [PATCH] Possible fix for (revoked?) Blob URLs This might fix #16. --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 1984b70..9b715c3 100644 --- a/src/index.js +++ b/src/index.js @@ -33,7 +33,7 @@ if (!self.fetch || !('jsdomWorker' in self.fetch)) { let oldFetch = self.fetch || fetch; self.fetch = function (url, opts) { let _url = typeof url === 'object' ? url.url || url.href : url; - if (_url.match(/^blob:/)) { + if (/^blob:/.test(_url)) { return new Promise((resolve, reject) => { let fr = new FileReader(); fr.onload = () => {