Skip to content
This repository was archived by the owner on Jan 27, 2024. It is now read-only.

Commit 6845b45

Browse files
committed
ensure promise rejoins component render cycle via $A.getCallback()
1 parent ccec575 commit 6845b45

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

force-app/main/aura/LC_API/LC_APIHelper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ License: BSD 3-Clause License
4747

4848
const helper = this;
4949

50-
return new Promise( function( resolve, reject ) {
50+
return new Promise( $A.getCallback( function( resolve, reject ) {
5151

5252
let child = helper._penpal.child;
5353

@@ -89,7 +89,7 @@ License: BSD 3-Clause License
8989

9090
}
9191

92-
});
92+
}));
9393

9494
},
9595

@@ -143,7 +143,7 @@ License: BSD 3-Clause License
143143

144144
const helper = this;
145145

146-
return new Promise( function( resolve, reject ) {
146+
return new Promise( $A.getCallback( function( resolve, reject ) {
147147

148148
const action = component.get( actionName );
149149

@@ -174,7 +174,7 @@ License: BSD 3-Clause License
174174

175175
$A.enqueueAction( action );
176176

177-
});
177+
}));
178178

179179
},
180180

0 commit comments

Comments
 (0)