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,
|
var args = arguments,
|
||||||
callback = args[args.length - 1],
|
callback = args[args.length - 1],
|
||||||
path = getPath(),
|
path = getPath(),
|
||||||
|
regexp = /dev\/$/,
|
||||||
time = +new Date();
|
time = +new Date();
|
||||||
|
|
||||||
if (args[0] === true) {
|
if (args[0] === true && regexp.test(path)) {
|
||||||
path = path.replace(/dev\/$/, 'build/');
|
path = path.replace(regexp, 'build/');
|
||||||
loadScript('Ox.js', function() {
|
loadScript('Ox.js', function() {
|
||||||
Ox.PATH = path;
|
Ox.PATH = path;
|
||||||
Ox.load.apply(null, Ox.slice(args, 1));
|
Ox.load.apply(null, Ox.slice(args, 1));
|
||||||
|
|
Loading…
Reference in a new issue