Skip to content
This repository was archived by the owner on Jul 31, 2018. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Made polyfill always require asynchronously
As discussed in the dedicated thread, `module.import` should always be async.
  • Loading branch information
WebReflection authored Feb 4, 2017
commit ced96316a7395acec47c74f268e3655e819cfd39
5 changes: 2 additions & 3 deletions XXX-module-import.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ represents how essential is this additional
// one added method to Module.prototype
module.constructor.prototype.import =
function (path) {
return new Promise(
res => res(this.require(path))
);
return Promise.resolve()
.then(() => this.require(path));
};
```

Expand Down