mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 08:19:05 +00:00
[Glitch] Enable ESLlint no-case-declarations
Port f91f077985 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -17,7 +17,7 @@ const dropOrientationIfNeeded = (orientation) => new Promise(resolve => {
|
||||
case false:
|
||||
resolve(orientation);
|
||||
break;
|
||||
default:
|
||||
default: {
|
||||
// black 2x1 JPEG, with the following meta information set:
|
||||
// - EXIF Orientation: 6 (Rotated 90° CCW)
|
||||
const testImageURL =
|
||||
@@ -39,6 +39,7 @@ const dropOrientationIfNeeded = (orientation) => new Promise(resolve => {
|
||||
};
|
||||
img.src = testImageURL;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Some browsers don't allow reading from a canvas and instead return all-white
|
||||
@@ -52,7 +53,7 @@ const checkCanvasReliability = () => new Promise((resolve, reject) => {
|
||||
case false:
|
||||
resolve();
|
||||
break;
|
||||
default:
|
||||
default: {
|
||||
// 2×2 GIF with white, red, green and blue pixels
|
||||
const testImageURL =
|
||||
'data:image/gif;base64,R0lGODdhAgACAKEDAAAA//8AAAD/AP///ywAAAAAAgACAAACA1wEBQA7';
|
||||
@@ -78,6 +79,7 @@ const checkCanvasReliability = () => new Promise((resolve, reject) => {
|
||||
};
|
||||
img.src = testImageURL;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const getImageUrl = inputFile => new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user