Skip to content

Commit

Permalink
Fix resizing images in Safari
Browse files Browse the repository at this point in the history
Fixes #3506
  • Loading branch information
joshuaruesweg committed Aug 13, 2020
1 parent d007916 commit 44da851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wcfsetup/install/files/js/WoltLabSuite/Core/Image/Resizer.js
Expand Up @@ -172,9 +172,9 @@ define([

var canvas = document.createElement('canvas');

var chromeBug = createImageBitmap(image).then(function (bitmap) {
var chromeBug = (window.createImageBitmap ? createImageBitmap(image).then(function (bitmap) {
if (bitmap.height != image.height) throw new Error('Chrome Bug #1069965');
});
}) : Promise.resolve());

// Prevent upscaling
var newWidth = Math.min(maxWidth, image.width);
Expand Down

0 comments on commit 44da851

Please sign in to comment.