perf(reactivity): add existing index or non-integer prop on Array should not trigger length dependency (#1969)

This commit is contained in:
xxgjzftd
2020-08-26 23:28:58 +08:00
committed by GitHub
parent 6df0e738cb
commit d5c4f6ed4d
4 changed files with 42 additions and 10 deletions

View File

@@ -81,6 +81,9 @@ export const toRawType = (value: unknown): string => {
export const isPlainObject = (val: unknown): val is object =>
toTypeString(val) === '[object Object]'
export const isIntegerKey = (key: unknown) =>
isString(key) && key[0] !== '-' && '' + parseInt(key, 10) === key
export const isReservedProp = /*#__PURE__*/ makeMap(
'key,ref,' +
'onVnodeBeforeMount,onVnodeMounted,' +