Skip to content

Commit 8d764d4

Browse files
committed
release: vue-class-setup@1.4.3
1 parent 4f64987 commit 8d764d4

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 1.4.3
22

3-
- fix: memory leak caused by unused `@Setup` decorator
3+
- fix: memory leak caused by unused `@Setup` decorator
4+
45
## 1.4.2
56

67
- fix: Type failure

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-class-setup",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"main": "dist/index.cjs.js",
55
"module": "dist/index.es.js",
66
"types": "dist/index.d.ts",

src/setup-reference.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
21
let count = 0;
32
let isOpen = false;
43

5-
export function add () {
4+
export function add() {
65
if (isOpen) {
76
count = 1;
87
} else {
@@ -18,22 +17,22 @@ export function popTarget(target: object): boolean {
1817
if (typeof count === 'number') {
1918
count--;
2019
if (count) {
21-
weakMap.set(target, count)
20+
weakMap.set(target, count);
2221
return false;
2322
} else {
2423
weakMap.delete(target);
25-
isOpen = false
24+
isOpen = false;
2625
return true;
2726
}
2827
}
29-
return false
28+
return false;
3029
}
3130

3231
export function bindTarget(target: object) {
3332
if (count > 0) {
3433
weakMap.set(target, count);
3534
count = 0;
3635
} else {
37-
console.warn(`The instance did not use the '@Setup' decorator`)
36+
console.warn(`The instance did not use the '@Setup' decorator`);
3837
}
3938
}

0 commit comments

Comments
 (0)