File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -553,6 +553,10 @@ export interface ComponentInternalInstance extends GenericComponentInstance {
553553 * Render effect instance
554554 */
555555 effect : ReactiveEffect
556+ /**
557+ * Force update render effect
558+ */
559+ update : ( ) => void
556560 /**
557561 * Render effect job to be passed to scheduler (checks if dirty)
558562 */
@@ -713,6 +717,7 @@ export function createComponentInstance(
713717 next : null ,
714718 subTree : null ! , // will be set synchronously right after creation
715719 effect : null ! ,
720+ update : null ! , // will be set synchronously right after creation
716721 job : null ! ,
717722 scope : new EffectScope ( true /* detached */ ) ,
718723 render : null ,
Original file line number Diff line number Diff line change @@ -383,7 +383,7 @@ export const publicPropertiesMap: PublicPropertiesMap =
383383 $forceUpdate : i =>
384384 i . f ||
385385 ( i . f = ( ) => {
386- queueJob ( ( ) => i . effect . run ( ) )
386+ queueJob ( i . update )
387387 } ) ,
388388 $nextTick : i => i . n || ( i . n = nextTick . bind ( i . proxy ! ) ) ,
389389 $watch : i => ( __FEATURE_OPTIONS_API__ ? instanceWatch . bind ( i ) : NOOP ) ,
Original file line number Diff line number Diff line change @@ -1672,6 +1672,7 @@ function baseCreateRenderer(
16721672 namespace ,
16731673 optimized ,
16741674 ) )
1675+ instance . update = effect . run . bind ( effect )
16751676
16761677 // allowRecurse
16771678 // #1801, #2043 component render effects should allow recursive updates
You can’t perform that action at this time.
0 commit comments