]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
Update getters code example to match description above (#1127)
authorTomek Wisnewski <tomek@wiszniewski.cc>
Wed, 9 Mar 2022 14:22:27 +0000 (15:22 +0100)
committerGitHub <noreply@github.com>
Wed, 9 Mar 2022 14:22:27 +0000 (15:22 +0100)
packages/docs/core-concepts/getters.md

index a5f543d79a3d5faffbd98c364cd20731c6853c90..41635ee2ed0310e8d509b3d20b5388ff69d3d402 100644 (file)
@@ -33,7 +33,7 @@ export const useStore = defineStore('main', {
     // the return type **must** be explicitly set
     doublePlusOne(): number {
       // autocompletion and typings for the whole store ✨
-      return this.counter * 2 + 1
+      return this.doubleCount + 1
     },
   },
 })