Browse Source

fix: handle arrays in v-on object syntax

Evan You 9 years ago
parent
commit
086e6d98f4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/instance/render-helpers/bind-object-listeners.js

+ 1 - 1
src/core/instance/render-helpers/bind-object-listeners.js

@@ -14,7 +14,7 @@ export function bindObjectListeners (data: any, value: any): VNodeData {
       for (const key in value) {
         const existing = on[key]
         const ours = value[key]
-        on[key] = existing ? [ours].concat(existing) : ours
+        on[key] = existing ? [].concat(ours, existing) : ours
       }
     }
   }