From 90251e52c3ff29422d9005a8325194e627ab62d8 Mon Sep 17 00:00:00 2001 From: Robby6Strings Date: Sun, 13 Oct 2024 21:48:55 +1300 Subject: [PATCH] lib/signal/WatchEffect - only apply '$HMR_ACCEPT' during dev --- packages/lib/src/signal.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/lib/src/signal.ts b/packages/lib/src/signal.ts index b82a79e..202730b 100644 --- a/packages/lib/src/signal.ts +++ b/packages/lib/src/signal.ts @@ -114,7 +114,7 @@ class WatchEffect { this.getter = getter this.subs = new Map() this.isRunning = false - + if (__DEV__) { this[$HMR_ACCEPT] = { provide: () => this, inject: (prev) => { @@ -124,6 +124,7 @@ class WatchEffect { destroy: () => { this.stop() }, + } } }