]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): use array destructuring instead of object for edge compat (#1302)
authorAlexandre Bonaventure Geissmann <alex@la-bonaventure.com>
Fri, 5 Jun 2020 14:57:44 +0000 (10:57 -0400)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2020 14:57:44 +0000 (10:57 -0400)
fix #1294

packages/runtime-core/src/componentProps.ts

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