mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
fix #12632
This commit is contained in:
parent
15e6f1dee4
commit
ca7daefaa1
@ -93,6 +93,10 @@ describe('SSR Reactive', () => {
|
||||
|
||||
set(state.value, 1, {})
|
||||
expect(isReactive(state.value[1])).toBe(true)
|
||||
|
||||
const rawArr = []
|
||||
set(rawArr, 1, {})
|
||||
expect(isReactive(rawArr[1])).toBe(false)
|
||||
})
|
||||
|
||||
// #550
|
||||
|
@ -241,7 +241,7 @@ export function set(
|
||||
target.length = Math.max(target.length, key)
|
||||
target.splice(key, 1, val)
|
||||
// when mocking for SSR, array methods are not hijacked
|
||||
if (!ob.shallow && ob.mock) {
|
||||
if (ob && !ob.shallow && ob.mock) {
|
||||
observe(val, false, true)
|
||||
}
|
||||
return val
|
||||
|
Loading…
Reference in New Issue
Block a user