File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -195,16 +195,16 @@ export class DynamicFragment extends VaporFragment {
195195 const prevSlotOwner = setCurrentSlotOwner ( this . slotOwner )
196196 // set currentKeepAliveCtx so nested DynamicFragments and components can capture it
197197 const prevKeepAliveCtx = setCurrentKeepAliveCtx ( keepAliveCtx )
198- const prevBranchKey =
199- keepAliveCtx && this . keyed
200- ? keepAliveCtx . setCurrentBranchKey ( this . current )
201- : undefined
198+ const needBranchKey = keepAliveCtx && this . keyed
199+ const prevBranchKey = needBranchKey
200+ ? keepAliveCtx . setCurrentBranchKey ( this . current )
201+ : undefined
202202 const prevInstance = setCurrentInstance ( instance )
203203 try {
204204 this . nodes = this . scope . run ( render ) || [ ]
205205 } finally {
206206 setCurrentInstance ( ...prevInstance )
207- if ( prevBranchKey ) keepAliveCtx ! . setCurrentBranchKey ( prevBranchKey )
207+ if ( needBranchKey ) keepAliveCtx . setCurrentBranchKey ( prevBranchKey )
208208 setCurrentKeepAliveCtx ( prevKeepAliveCtx )
209209 setCurrentSlotOwner ( prevSlotOwner )
210210 }
You can’t perform that action at this time.
0 commit comments