Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Fix IE blob-creating bug #816

Benjamin King4daf9947fb50
diff --git a/web/js/animation/gif-creater.js b/web/js/animation/gif-creater.js
index 15b3d0512..b36e58cec 100644
--- a/web/js/animation/gif-creater.js
+++ b/web/js/animation/gif-creater.js
@@ -1,5 +1,6 @@
import GifWriter from 'gifwriter';
import NeuQuant from 'neuquant';
+import Promise from 'bluebird';
import { ReadableStream } from 'web-streams-polyfill';
import lodashEach from 'lodash/each';
@@ -90,9 +91,10 @@ export default class gifCreater {
Promise.all(imagePromiseArray).then((images) => {
var gifStream = this.getStream(images, ctx);
var reader = gifStream.getReader();
+
function pull() {
return reader.read().then(function (result) {
- chunks.push(result.value);
+ if (result.value) chunks.push(result.value);
return result.done ? chunks : pull();
});
};