Skip to content

Commit eda2a43

Browse files
authored
refactor(runtime-vapor): remove shallowRef list for v-for (#281)
1 parent 5f6cd32 commit eda2a43

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/runtime-vapor/src/apiCreateFor.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import {
22
type EffectScope,
33
type ShallowRef,
44
effectScope,
5-
isReactive,
65
shallowRef,
76
} from '@vue/reactivity'
87
import { isArray, isObject, isString } from '@vue/shared'
@@ -325,11 +324,7 @@ export const createFor = (
325324
) {
326325
const [item, key, index] = block.state
327326
let needsUpdate =
328-
newItem !== item.value ||
329-
newKey !== key.value ||
330-
newIndex !== index.value ||
331-
// shallowRef list
332-
(isObject(newItem) && !isReactive(newItem))
327+
newItem !== item.value || newKey !== key.value || newIndex !== index.value
333328
if (needsUpdate) updateState(block, newItem, newKey, newIndex)
334329
}
335330

0 commit comments

Comments
 (0)