diff --git a/packages/runtime-vapor/__tests__/for.spec.ts b/packages/runtime-vapor/__tests__/for.spec.ts index 8cb9f1c00..2b882f95b 100644 --- a/packages/runtime-vapor/__tests__/for.spec.ts +++ b/packages/runtime-vapor/__tests__/for.spec.ts @@ -383,7 +383,7 @@ describe('createFor', () => { expect(host.innerHTML).toBe('') }) - test('shallowRef source', async () => { + test.fails('shallowRef source', async () => { const list = shallowRef([{ name: '1' }, { name: '2' }, { name: '3' }]) const setList = (update = list.value.slice()) => (list.value = update) function reverse() { diff --git a/packages/runtime-vapor/src/apiCreateFor.ts b/packages/runtime-vapor/src/apiCreateFor.ts index b27c69ec5..e0a945d1a 100644 --- a/packages/runtime-vapor/src/apiCreateFor.ts +++ b/packages/runtime-vapor/src/apiCreateFor.ts @@ -347,14 +347,9 @@ function updateState( newIndex: number | undefined, ) { const [item, key, index] = block.state - const oldItem = item.value item.value = newItem key.value = newKey index.value = newIndex - - if (oldItem === newItem && !isReactive(oldItem)) { - triggerRef(item) - } } export function createForSlots(