File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,13 @@ export class EffectScope {
6262 }
6363 }
6464
65+ prevScope : EffectScope | undefined
6566 /**
6667 * This should only be called on non-detached scopes
6768 * @internal
6869 */
6970 on ( ) {
71+ this . prevScope = activeEffectScope
7072 activeEffectScope = this
7173 }
7274
@@ -75,7 +77,7 @@ export class EffectScope {
7577 * @internal
7678 */
7779 off ( ) {
78- activeEffectScope = this . parent
80+ activeEffectScope = this . prevScope
7981 }
8082
8183 stop ( fromParent ?: boolean ) {
Original file line number Diff line number Diff line change @@ -23,12 +23,16 @@ export default defineComponent({
2323 const container = document . createElement ( 'li' )
2424 append ( container , node )
2525
26- const update = ( ) => {
26+ renderEffect ( ( ) => {
2727 const [ item , index ] = block . s
2828 node . textContent = `${ index } . ${ item } `
29- }
30- renderEffect ( update )
31- return [ container , update ]
29+ } )
30+
31+ renderEffect ( ( ) => {
32+ const [ item , index ] = block . s
33+ node . textContent = `${ index } / ${ item } `
34+ } )
35+ return container
3236 } ,
3337 ( item , index ) => index ,
3438 )
You can’t perform that action at this time.
0 commit comments