Merge pull request #374 from WebReflection/moz-extension

Enable moz-extension:// too
master
jeromewu 5 years ago committed by GitHub
commit 5c22cd52bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/worker/node/loadImage.js

@ -19,7 +19,7 @@ module.exports = async (image) => {
} }
if (typeof image === 'string') { if (typeof image === 'string') {
if (isURL(image) || image.startsWith('chrome-extension://') || image.startsWith('file://')) { if (isURL(image) || image.startsWith('moz-extension://') || image.startsWith('chrome-extension://') || image.startsWith('file://')) {
const { data: _data } = await axios.get(image, { responseType: 'arraybuffer' }); const { data: _data } = await axios.get(image, { responseType: 'arraybuffer' });
data = _data; data = _data;
} else if (/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(image)) { } else if (/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(image)) {

Loading…
Cancel
Save