Skip to content

Commit

Permalink
Plots.resize: delete old promise resolver if present
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinerg committed Dec 5, 2019
1 parent 5ee431e commit 5e71cff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ plots.resize = function(gd) {
Registry.call('relayout', gd, {autosize: true}).then(function() {
gd.changed = oldchanged;
// Only resolve if a new call hasn't been made!
if(gd._resolveResize === resolve) resolve(gd);
if(gd._resolveResize === resolve) {
delete gd._resolveResize;
resolve(gd);
}
});
}, 100);
});
Expand Down

0 comments on commit 5e71cff

Please sign in to comment.