fix(runtime-core): use array destructuring instead of object for edge compat (#1302)

fix #1294
This commit is contained in:
Alexandre Bonaventure Geissmann 2020-06-05 10:57:44 -04:00 committed by GitHub
parent 75d6a1cc04
commit 4a5021e763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ export function updateProps(
} = instance } = instance
const rawOptions = instance.type.props const rawOptions = instance.type.props
const rawCurrentProps = toRaw(props) const rawCurrentProps = toRaw(props)
const { 0: options } = normalizePropsOptions(rawOptions) const [options] = normalizePropsOptions(rawOptions)
if ((optimized || patchFlag > 0) && !(patchFlag & PatchFlags.FULL_PROPS)) { if ((optimized || patchFlag > 0) && !(patchFlag & PatchFlags.FULL_PROPS)) {
if (patchFlag & PatchFlags.PROPS) { if (patchFlag & PatchFlags.PROPS) {
@ -220,7 +220,7 @@ function setFullProps(
props: Data, props: Data,
attrs: Data attrs: Data
) { ) {
const { 0: options, 1: needCastKeys } = normalizePropsOptions( const [options, needCastKeys] = normalizePropsOptions(
instance.type.props instance.type.props
) )
const emits = instance.type.emits const emits = instance.type.emits