Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 15f55a3

Browse files
committed
Delay the call to require() in system.js until needed
1 parent 137c021 commit 15f55a3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/system.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@
9898
}
9999
}
100100
else {
101-
var fs = require('fs');
101+
var fs;
102102
fetchTextFromURL = function(url, fulfill, reject) {
103+
fs = fs || require('fs');
103104
return fs.readFile(url, function(err, data) {
104105
if (err)
105106
return reject(err);

0 commit comments

Comments
 (0)