Upgrade to typescript-eslint
v6 (#25904)
This commit is contained in:
parent
3ed9b55cb3
commit
a7253075d1
23 changed files with 133 additions and 107 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue