Skip to content

Commit

Permalink
fix(runtime-core):v-for ref behaves differently under prod and dev vu…
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c committed Sep 21, 2022
1 parent 8772a01 commit 80fdddb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/rendererTemplateRef.ts
Expand Up @@ -12,7 +12,7 @@ import {
import { isAsyncWrapper } from './apiAsyncComponent'
import { getExposeProxy } from './component'
import { warn } from './warning'
import { isRef } from '@vue/reactivity'
import {isRef, reactive} from '@vue/reactivity'
import { callWithErrorHandling, ErrorCodes } from './errorHandling'
import { SchedulerJob } from './scheduler'
import { queuePostRenderEffect } from './renderer'
Expand Down Expand Up @@ -61,7 +61,7 @@ export function setRef(
return
}
const oldRef = oldRawRef && (oldRawRef as VNodeNormalizedRefAtom).r
const refs = owner.refs === EMPTY_OBJ ? (owner.refs = {}) : owner.refs
const refs = owner.refs === EMPTY_OBJ ? (owner.refs = reactive({})) : owner.refs
const setupState = owner.setupState

// dynamic ref changed. unset old ref
Expand Down

0 comments on commit 80fdddb

Please sign in to comment.