Skip to content

Commit 6e871ec

Browse files
committed
Fix example in README not working
1 parent e2ea953 commit 6e871ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ Alternately, you can link it directly from a CDN:
120120
},
121121
asyncComputed: {
122122
async sum () {
123+
const total = this.x + this.y
123124
await new Promise(resolve => setTimeout(resolve, 1000))
124-
return this.x + this.y
125+
return total
125126
}
126127
}
127128
})
@@ -164,8 +165,9 @@ export default {
164165
the sum of the values to which you set vm.x and vm.y the previous second.
165166
*/
166167
async sum () {
168+
const total = this.x + this.y
167169
await new Promise(resolve => setTimeout(resolve, 1000))
168-
return this.x + this.y
170+
return total
169171
}
170172
}
171173
}

0 commit comments

Comments
 (0)