Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad7ea28

Browse files
committed
do not log in clearPromiseQueue is _promises is empty
1 parent 48eec0c commit ad7ea28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/plot_api/plot_api.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ function getGraphDiv(gd) {
353353

354354
// clear the promise queue if one of them got rejected
355355
function clearPromiseQueue(gd) {
356-
Lib.log('Clearing previous rejected promises from queue.');
356+
if(Array.isArray(gd._promises) && gd._promises.length > 0) {
357+
Lib.log('Clearing previous rejected promises from queue.');
358+
}
359+
357360
gd._promises = [];
358361
}
359362

0 commit comments

Comments
 (0)