refactor(reactivity): avoid setting up debug flags on falsy onTrigger value

This commit is contained in:
Evan You 2025-01-29 15:45:54 +08:00
parent 674151c9b9
commit 1e9062c075
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ export function setupOnTrigger(target: { new (...args: any[]): any }): void {
return this._onTrigger
},
set(val) {
if (!this._onTrigger) setupFlagsHandler(this)
if (val && !this._onTrigger) setupFlagsHandler(this)
this._onTrigger = val
},
})