From ea16928d350ad46e20d0af9ea7f0c68b9ab65af6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 13 Jun 2024 16:59:56 +0100 Subject: [PATCH] Remove setImmediate polyfill (#27567) --- package.json | 1 - src/favicon.ts | 4 ++-- src/vector/index.ts | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 965dcc2474..f5c24ba8ed 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,6 @@ "raw-loader": "^4.0.2", "rimraf": "^5.0.0", "semver": "^7.5.2", - "setimmediate": "^1.0.5", "string-replace-loader": "3", "style-loader": "4", "stylelint": "^16.1.0", diff --git a/src/favicon.ts b/src/favicon.ts index 5b8109501f..5141bf1f37 100644 --- a/src/favicon.ts +++ b/src/favicon.ts @@ -194,9 +194,9 @@ export default class Favicon { } private setIcon(canvas: HTMLCanvasElement): void { - setImmediate(() => { + setTimeout(() => { this.setIconSrc(canvas.toDataURL("image/png")); - }); + }, 0); } private setIconSrc(url: string): void { diff --git a/src/vector/index.ts b/src/vector/index.ts index e21fa5860a..bb9ae9ed0f 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -25,9 +25,6 @@ import { extractErrorMessageFromError } from "matrix-react-sdk/src/components/vi import { parseQsFromFragment } from "./url_utils"; import "./modernizr"; -// Make setImmediate available in bundle -import "setimmediate"; - // Require common CSS here; this will make webpack process it into bundle.css. // Our own CSS (which is themed) is imported via separate webpack entry points // in webpack.config.js