Skip to content

Commit 9e9f8e0

Browse files
committed
bug: fix issue with loader ordering when using a 3rd party promise library (i.e. bluebird)
1 parent 13084da commit 9e9f8e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Microframework.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ export class Microframework {
108108
}).then(() => {
109109
return this.runInSequence(this.loaders, loader => {
110110
const loaderResult = loader(settings);
111-
return loaderResult instanceof Promise ? loaderResult : Promise.resolve();
111+
if (loaderResult != null && typeof loaderResult.then !== "function") {
112+
return loaderResult;
113+
} else {
114+
return Promise.resolve();
115+
}
112116
});
113117

114118
}).then(() => {

0 commit comments

Comments
 (0)