OxJS loader: only switch to build version on load if actually from dev version

This commit is contained in:
rolux 2013-12-04 23:46:20 +01:00
parent a330964890
commit 53cbceada4

View file

@ -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));