OxJS loader: only switch to build version on load if actually from dev version
This commit is contained in:
parent
a330964890
commit
53cbceada4
1 changed files with 3 additions and 2 deletions
|
@ -9,10 +9,11 @@
|
|||
var args = arguments,
|
||||
callback = args[args.length - 1],
|
||||
path = getPath(),
|
||||
regexp = /dev\/$/,
|
||||
time = +new Date();
|
||||
|
||||
if (args[0] === true) {
|
||||
path = path.replace(/dev\/$/, 'build/');
|
||||
if (args[0] === true && regexp.test(path)) {
|
||||
path = path.replace(regexp, 'build/');
|
||||
loadScript('Ox.js', function() {
|
||||
Ox.PATH = path;
|
||||
Ox.load.apply(null, Ox.slice(args, 1));
|
||||
|
|
Loading…
Reference in a new issue