mirror of https://github.com/vector-im/riot-web
more lint
parent
45f3282b1b
commit
20aedce62f
|
@ -26,6 +26,7 @@ import { _t } from './languageHandler';
|
||||||
import Modal from './Modal';
|
import Modal from './Modal';
|
||||||
import RoomViewStore from './stores/RoomViewStore';
|
import RoomViewStore from './stores/RoomViewStore';
|
||||||
import encrypt from "browser-encrypt-attachment";
|
import encrypt from "browser-encrypt-attachment";
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
import png_chunks_extract from "png-chunks-extract";
|
import png_chunks_extract from "png-chunks-extract";
|
||||||
|
|
||||||
// Polyfill for Canvas.toBlob API using Canvas.toDataURL
|
// Polyfill for Canvas.toBlob API using Canvas.toDataURL
|
||||||
|
@ -132,8 +133,8 @@ function loadImageElement(imageFile) {
|
||||||
// Once ready, create a thumbnail
|
// Once ready, create a thumbnail
|
||||||
img.onload = function() {
|
img.onload = function() {
|
||||||
URL.revokeObjectURL(objectUrl);
|
URL.revokeObjectURL(objectUrl);
|
||||||
let width = hidpi ? (img.width >> 1) : img.width;
|
const width = hidpi ? (img.width >> 1) : img.width;
|
||||||
let height = hidpi ? (img.height >> 1) : img.height;
|
const height = hidpi ? (img.height >> 1) : img.height;
|
||||||
deferred.resolve({ img, width, height });
|
deferred.resolve({ img, width, height });
|
||||||
};
|
};
|
||||||
img.onerror = function(e) {
|
img.onerror = function(e) {
|
||||||
|
|
Loading…
Reference in New Issue