From 81fb7c6322f4fd5f56ea95b268597f5365af6f39 Mon Sep 17 00:00:00 2001 From: V Date: Thu, 23 Nov 2023 06:45:01 +0100 Subject: [PATCH] add back code that got lost --- src/webpack/webpack.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index b4fdb4e1..980288e9 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -338,6 +338,9 @@ export function waitFor(filter: string | string[] | FilterFn, callback: Callback else if (typeof filter !== "function") throw new Error("filter must be a string, string[] or function, got " + typeof filter); + const [existing, id] = find(filter!, { isIndirect: true, isWaitFor: true }); + if (existing) return void callback(existing, id); + subscriptions.set(filter, callback); }