From c61d17392222463b7d1efd9f0daf4f11b5713a4a Mon Sep 17 00:00:00 2001 From: j Date: Thu, 1 Apr 2021 11:56:38 +0200 Subject: [PATCH] allow setting locale urls for locale=en --- source/Ox/js/Locale.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/Ox/js/Locale.js b/source/Ox/js/Locale.js index 9a6fe862..4d6c674f 100644 --- a/source/Ox/js/Locale.js +++ b/source/Ox/js/Locale.js @@ -45,15 +45,19 @@ ]); } }); - url && Ox.makeArray(url).forEach(function(value) { - urls.push(Ox.makeArray(value)); - }); + } + url && Ox.makeArray(url).forEach(function(value) { + urls.push(Ox.makeArray(value)); + }); + if (urls.length) { Ox.getJSON(urls, function(data) { Ox.forEach(data, function(values, url) { Ox.extend(translations, values); }); callback(true); - }); + }) + } else { + callback(true); } } else { callback(false);