ol 8.1.0 → 8.1.1-dev.1694181546791

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Image.js CHANGED
@@ -296,7 +296,7 @@ export function decodeFallback(image, src) {
296
296
  if (src) {
297
297
  image.src = src;
298
298
  }
299
- return IMAGE_DECODE
299
+ return image.src && IMAGE_DECODE
300
300
  ? new Promise((resolve, reject) =>
301
301
  image.decode().then(() => resolve(image), reject)
302
302
  )
@@ -316,7 +316,7 @@ export function decode(image, src) {
316
316
  if (src) {
317
317
  image.src = src;
318
318
  }
319
- return IMAGE_DECODE && CREATE_IMAGE_BITMAP
319
+ return image.src && IMAGE_DECODE && CREATE_IMAGE_BITMAP
320
320
  ? image.decode().then(() => createImageBitmap(image))
321
321
  : decodeFallback(image);
322
322
  }