We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fba53f commit f4df466Copy full SHA for f4df466
lib/utils/debounce.html
@@ -127,6 +127,8 @@
127
* @return {void}
128
*/
129
Polymer.enqueueDebouncer = function(debouncer) {
130
+ // Re-enqueued debouncers are put at the end of the queue; for Set, this
131
+ // means removing and re-adding, since forEach traverses insertion order
132
if (debouncerQueue.has(debouncer)) {
133
debouncerQueue.delete(debouncer);
134
}
@@ -135,6 +137,8 @@
135
137
136
138
Polymer.flushDebouncers = function() {
139
const didFlush = Boolean(debouncerQueue.size);
140
+ // If new debouncers are added while flushing, Set.forEach will ensure
141
+ // newly added ones are also flushed
142
debouncerQueue.forEach(debouncer => {
143
try {
144
debouncer.flush();
0 commit comments