From 53cbceada46f2a5b6d5af5dcd9c886345bfa213d Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 4 Dec 2013 23:46:20 +0100 Subject: [PATCH] OxJS loader: only switch to build version on load if actually from dev version --- source/Ox.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/Ox.js b/source/Ox.js index e72614ab..1ad65c0f 100644 --- a/source/Ox.js +++ b/source/Ox.js @@ -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));