From 088efd91dd45e3f725e815655de3bd1fb7356858 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 21 May 2019 18:17:16 +0100 Subject: [PATCH] fix: fix error when preloding is disabled in the browser Sometimes you don't want to preload everything, if your code is an example or a demo. In that case you'd turn off preloading but `setImmediate` is not a thing in browsers-other-than-IE so pull in `async/set-immediate` instead --- src/core/mfs-preload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/mfs-preload.js b/src/core/mfs-preload.js index cffec375b0..dcf783ea76 100644 --- a/src/core/mfs-preload.js +++ b/src/core/mfs-preload.js @@ -1,7 +1,7 @@ 'use strict' const debug = require('debug') - +const setImmediate = require('async/setImmediate') const log = debug('ipfs:mfs-preload') log.error = debug('ipfs:mfs-preload:error')