Skip to content

Commit e139925

Browse files
authored
Merge pull request #789 from plotly/clear-promise-log
Do not log in clearPromiseQueue is _promises is empty
2 parents 94be168 + ad7ea28 commit e139925

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
@@ -364,7 +364,10 @@ function getGraphDiv(gd) {
364364

365365
// clear the promise queue if one of them got rejected
366366
function clearPromiseQueue(gd) {
367-
Lib.log('Clearing previous rejected promises from queue.');
367+
if(Array.isArray(gd._promises) && gd._promises.length > 0) {
368+
Lib.log('Clearing previous rejected promises from queue.');
369+
}
370+
368371
gd._promises = [];
369372
}
370373

0 commit comments

Comments
 (0)