Ver código fonte

Don't send an empty array.

Eugene Lazutkin 3 anos atrás
pai
commit
55865d34a6
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      src/utils/batch.js

+ 1 - 0
src/utils/batch.js

@@ -7,6 +7,7 @@ const batch = (n = 100) => {
   return flushable(value => {
     if (value === none) {
       // clean up buffer
+      if (!buffer.length) return none;
       const result = buffer;
       buffer = null;
       return result;