Skip to content

Commit

Permalink
Remove unneeded dynRequire use from lib/runtime. (standard-things#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton authored and benjamn committed Mar 25, 2017
1 parent 718f69b commit 95e5702
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/runtime.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
var hasOwn = Object.prototype.hasOwnProperty;
var Entry = require("./entry.js").Entry;
var utils = require("./utils.js");
var dynRequire = module.require ? function require(id) {
// Infuriatingly, this code may have to run in environments that do not
// have Function.prototype.bind (cough cough PhantomJS).
return module.require(id);
} : __non_webpack_require__;

exports.enable = function (Module) {
var Mp = Module.prototype;
Expand Down Expand Up @@ -84,9 +79,7 @@ exports.enable = function (Module) {
}

var countBefore = entry && entry.runCount;
var exports = typeof module.require === "function"
? module.require(absoluteId)
: dynRequire(absoluteId);
var exports = module.require(absoluteId);

if (entry && entry.runCount === countBefore) {
// If require(absoluteId) didn't run any setters for this entry,
Expand Down

0 comments on commit 95e5702

Please sign in to comment.