Skip to content

Commit

Permalink
fix: fist subscription execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Wroud committed Nov 27, 2024
1 parent 85abb44 commit 089da33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@wroud/flow-middleware/src/MiddlewareRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ async function subscribe(
): Promise<void> {
const existingSubscription = state.get(key);

if (areDependenciesEqual(existingSubscription?.dependencies, dependencies)) {
if (
existingSubscription &&
areDependenciesEqual(existingSubscription.dependencies, dependencies)
) {
return;
}

Expand Down

0 comments on commit 089da33

Please sign in to comment.