Skip to content

Commit

Permalink
lib/signal/WatchEffect - only apply '$HMR_ACCEPT' during dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LankyMoose committed Oct 13, 2024
1 parent 5ff0f5c commit 90251e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/lib/src/signal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -124,6 +124,7 @@ class WatchEffect {
destroy: () => {
this.stop()
},
}
}
}

Expand Down

0 comments on commit 90251e5

Please sign in to comment.