File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 1-
21let count = 0 ;
32let 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
3231export 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}
You can’t perform that action at this time.
0 commit comments