Skip to content

Commit

Permalink
chore: remove invalid codes for v-for + shallowRef
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleSound committed Sep 28, 2024
1 parent 5f6cd32 commit 2656669
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/runtime-vapor/src/apiCreateFor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
type EffectScope,
type ShallowRef,
effectScope,
isReactive,
shallowRef,
} from '@vue/reactivity'
import { isArray, isObject, isString } from '@vue/shared'
Expand Down Expand Up @@ -325,11 +324,7 @@ export const createFor = (
) {
const [item, key, index] = block.state
let needsUpdate =
newItem !== item.value ||
newKey !== key.value ||
newIndex !== index.value ||
// shallowRef list
(isObject(newItem) && !isReactive(newItem))
newItem !== item.value || newKey !== key.value || newIndex !== index.value
if (needsUpdate) updateState(block, newItem, newKey, newIndex)
}

Expand Down

0 comments on commit 2656669

Please sign in to comment.