]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compat): return value of vue compat set() (#9377)
authorVít Stanislav <slaweet@gmail.com>
Thu, 19 Oct 2023 12:58:59 +0000 (14:58 +0200)
committerGitHub <noreply@github.com>
Thu, 19 Oct 2023 12:58:59 +0000 (20:58 +0800)
According to https://v2.vuejs.org/v2/api/#Vue-set, Returns: the set value.

packages/runtime-core/src/compat/instance.ts

index 141f0bf0a0fb16a57e077569d23689ff278de7c3..e6baeda6a8e30555e32dcbb372c7c6f76f280222 100644 (file)
@@ -58,6 +58,7 @@ export interface LegacyPublicProperties {
 export function installCompatInstanceProperties(map: PublicPropertiesMap) {
   const set = (target: any, key: any, val: any) => {
     target[key] = val
+    return target[key]
   }
 
   const del = (target: any, key: any) => {