Skip to content

Commit

Permalink
Fix runtime references to 'require' when a require-prefix is in use (…
Browse files Browse the repository at this point in the history
…fixes github issue #16)
  • Loading branch information
afri committed Jul 26, 2014
1 parent de32b3c commit 3c81e71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/sys/apollo-sys-xbrowser.sjs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ if (!__oni_rt.G.__oni_rt_no_script_load) {
var descriptor = {
id: document.location.href + "_inline_sjs_" + (i + 1),
};
require.main = descriptor;
__oni_rt.sys.require.main = descriptor;
var f = exports.eval("(function(module, __onimodulename){"+content+"\n})",
{filename:"module #{descriptor.id}"});
f(descriptor);
Expand All @@ -482,7 +482,7 @@ if (!__oni_rt.G.__oni_rt_no_script_load) {

var mainModule = determineLocation().main;
if(mainModule) {
require(mainModule, {main:true});
__oni_rt.sys.require(mainModule, {main:true});
}
};

Expand Down
Loading

0 comments on commit 3c81e71

Please sign in to comment.