]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(defineModel): always default modifiers to empty object
authorEvan You <yyx990803@gmail.com>
Sat, 30 Dec 2023 00:26:48 +0000 (08:26 +0800)
committerEvan You <yyx990803@gmail.com>
Sat, 30 Dec 2023 00:26:48 +0000 (08:26 +0800)
close #9945

packages/runtime-core/src/apiSetupHelpers.ts

index 244e30ac9a8fec2168be5087931db4b77e149788..dfa1635ad4f5799073908b4fc7954f109655f2f8 100644 (file)
@@ -414,7 +414,7 @@ export function useModel(
     return {
       next() {
         if (i < 2) {
-          return { value: i++ ? props[modifierKey] : res, done: false }
+          return { value: i++ ? props[modifierKey] || {} : res, done: false }
         } else {
           return { done: true }
         }