0
0
Fork 0

Upgrade to typescript-eslint v6 (#25904)

This commit is contained in:
Renaud Chaput 2023-07-13 11:49:16 +02:00 committed by GitHub
parent 3ed9b55cb3
commit a7253075d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 133 additions and 107 deletions

View file

@ -4,7 +4,7 @@ import 'core-js/features/symbol';
import 'core-js/features/promise/finally';
import { decode as decodeBase64 } from '../utils/base64';
if (!HTMLCanvasElement.prototype.toBlob) {
if (!Object.hasOwn(HTMLCanvasElement.prototype, 'toBlob')) {
const BASE64_MARKER = ';base64,';
Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {
@ -17,7 +17,7 @@ if (!HTMLCanvasElement.prototype.toBlob) {
const dataURL: string = this.toDataURL(type, quality);
let data;
if (dataURL.indexOf(BASE64_MARKER) >= 0) {
if (dataURL.includes(BASE64_MARKER)) {
const [, base64] = dataURL.split(BASE64_MARKER);
data = decodeBase64(base64);
} else {