From fe6b1a9565f760a542385bd685624078cd13e87b Mon Sep 17 00:00:00 2001 From: gdh1995 Date: Sun, 23 Jul 2023 23:00:07 +0800 Subject: [PATCH] merge from master --- lib/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils.ts b/lib/utils.ts index 065932892..d471a0998 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -259,9 +259,9 @@ export const promiseDefer_ = (): { p: Promise, r: (value: T) => void } => } // if `var queueMicrotask`, on Firefox globalThis.queueMicrotask is undefined even when window.queueMicrotask exists -export const queueTask_: typeof queueMicrotask | undefined = !OnFirefox || !(Build.BTypes & BrowserType.Edge +export const queueTask_: typeof queueMicrotask | undefined = Build.NDEBUG && (!(Build.BTypes & BrowserType.Edge || Build.BTypes & BrowserType.Firefox && Build.MinFFVer < FirefoxBrowserVer.Min$queueMicrotask - || Build.BTypes & BrowserType.Chrome && Build.MinCVer < BrowserVer.Min$queueMicrotask) + || Build.BTypes & BrowserType.Chrome && Build.MinCVer < BrowserVer.Min$queueMicrotask) || !OnFirefox) ? queueMicrotask : (window as {} as typeof globalThis).queueMicrotask && (window as {} as typeof globalThis).queueMicrotask.bind(window)