about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-08-15 11:52:26 +0200
committerThibaut Girka <thib@sitedethib.com>2019-08-19 21:49:39 +0200
commit4e9794f53391b3e8291b800af613bcf6d74550a9 (patch)
tree40b547a42e293bbcdc5329e8b6ec66fb6bb6d0f2 /app/javascript/flavours/glitch
parent26b249ad2dd04372aa56103ac59f9ece2eb58f0c (diff)
[Glitch] Fix client-side resizing of image uploads
Port f178a01c11a4af077926dd035a0c4c44f6b3985c to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/util/resize_image.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/util/resize_image.js b/app/javascript/flavours/glitch/util/resize_image.js
index a8ec5f3fa..d566edb03 100644
--- a/app/javascript/flavours/glitch/util/resize_image.js
+++ b/app/javascript/flavours/glitch/util/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';
   }