in ox loader, don't overwrite previous Ox

This commit is contained in:
rolux 2012-06-25 21:22:20 +02:00
parent c6bf7ac770
commit 835c848933

View file

@ -12,8 +12,14 @@
time = +new Date();
loadJSON(function(data) {
var previousOx = global.Ox;
loadScriptsSerial(data.files, function() {
Ox.VERSION = data.version;
Ox.forEach(previousOx, function(value, key) {
if (Ox.isUndefined(Ox[key])) {
Ox[key] = value;
}
});
Ox.load.apply(null, args);
});
});