about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-08-15 11:52:26 +0200
committerEugen Rochko <eugen@zeonfederated.com>2019-08-15 11:52:26 +0200
commitf178a01c11a4af077926dd035a0c4c44f6b3985c (patch)
treed69a76b0f0594b96112857002174cadef96a7445
parent23f7afa562c49b24e979505680463bc712b11d94 (diff)
Fix client-side resizing of image uploads (#11570)
Fixes #11567
-rw-r--r--app/javascript/mastodon/utils/resize_image.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/utils/resize_image.js b/app/javascript/mastodon/utils/resize_image.js
index a8ec5f3fa..d566edb03 100644
--- a/app/javascript/mastodon/utils/resize_image.js
+++ b/app/javascript/mastodon/utils/resize_image.js
@@ -71,7 +71,7 @@ const processImage = (img, { width, height, orientation, type = 'image/png' }) =
   // and return an all-white image instead. Assume reading failed if the resized
   // image is perfectly white.
   const imageData = context.getImageData(0, 0, width, height);
-  if (imageData.every(value => value === 255)) {
+  if (imageData.data.every(value => value === 255)) {
     throw 'Failed to read from canvas';
   }