mirror of
https://github.com/Youzini-afk/ST-Bionic-Memory-Ecology.git
synced 2026-05-15 22:30:38 +08:00
Fix message received microtask scheduling
This commit is contained in:
@@ -507,10 +507,10 @@ export function onMessageReceivedController(
|
||||
_type = "",
|
||||
) {
|
||||
const enqueueMicrotask =
|
||||
typeof runtime.queueMicrotask === "function"
|
||||
? runtime.queueMicrotask.bind(runtime)
|
||||
: typeof globalThis.queueMicrotask === "function"
|
||||
typeof globalThis.queueMicrotask === "function"
|
||||
? globalThis.queueMicrotask.bind(globalThis)
|
||||
: typeof runtime.queueMicrotask === "function"
|
||||
? (task) => Reflect.apply(runtime.queueMicrotask, globalThis, [task])
|
||||
: (task) => Promise.resolve().then(task);
|
||||
const persistenceState = runtime.getGraphPersistenceState?.() || {};
|
||||
const loadState = persistenceState.loadState || "";
|
||||
|
||||
Reference in New Issue
Block a user