File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,21 @@ class AssignNode extends TempNode {
5656
5757 const sourceType = sourceNode . getNodeType ( builder ) ;
5858
59+ const nodeData = builder . getDataFromNode ( this ) ;
60+
5961 //
6062
6163 let snippet ;
6264
63- if ( needsSplitAssign ) {
65+ if ( nodeData . initialized === true ) {
66+
67+ if ( output !== 'void' ) {
68+
69+ snippet = target ;
70+
71+ }
72+
73+ } else if ( needsSplitAssign ) {
6474
6575 const sourceVar = builder . getVarFromNode ( this , null , targetType ) ;
6676 const sourceProperty = builder . getPropertyName ( sourceVar ) ;
@@ -101,6 +111,8 @@ class AssignNode extends TempNode {
101111
102112 }
103113
114+ nodeData . initialized = true ;
115+
104116 return builder . format ( snippet , targetType , output ) ;
105117
106118 }
You can’t perform that action at this time.
0 commit comments