File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
## 1.4.3
2
2
3
- - fix: memory leak caused by unused ` @Setup ` decorator
3
+ - fix: memory leak caused by unused ` @Setup ` decorator
4
+
4
5
## 1.4.2
5
6
6
7
- fix: Type failure
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-class-setup" ,
3
- "version" : " 1.4.2 " ,
3
+ "version" : " 1.4.3 " ,
4
4
"main" : " dist/index.cjs.js" ,
5
5
"module" : " dist/index.es.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change 1
-
2
1
let count = 0 ;
3
2
let isOpen = false ;
4
3
5
- export function add ( ) {
4
+ export function add ( ) {
6
5
if ( isOpen ) {
7
6
count = 1 ;
8
7
} else {
@@ -18,22 +17,22 @@ export function popTarget(target: object): boolean {
18
17
if ( typeof count === 'number' ) {
19
18
count -- ;
20
19
if ( count ) {
21
- weakMap . set ( target , count )
20
+ weakMap . set ( target , count ) ;
22
21
return false ;
23
22
} else {
24
23
weakMap . delete ( target ) ;
25
- isOpen = false
24
+ isOpen = false ;
26
25
return true ;
27
26
}
28
27
}
29
- return false
28
+ return false ;
30
29
}
31
30
32
31
export function bindTarget ( target : object ) {
33
32
if ( count > 0 ) {
34
33
weakMap . set ( target , count ) ;
35
34
count = 0 ;
36
35
} else {
37
- console . warn ( `The instance did not use the '@Setup' decorator` )
36
+ console . warn ( `The instance did not use the '@Setup' decorator` ) ;
38
37
}
39
38
}
You can’t perform that action at this time.
0 commit comments