@erickxavier/no-js 1.4.0 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/no.js +5 -5
- package/dist/cjs/no.js.map +2 -2
- package/dist/esm/no.js +5 -5
- package/dist/esm/no.js.map +2 -2
- package/dist/iife/no.js +5 -5
- package/dist/iife/no.js.map +2 -2
- package/package.json +1 -1
- package/src/index.js +4 -2
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -90,6 +90,8 @@ const NoJS = {
|
|
|
90
90
|
|
|
91
91
|
async init(root) {
|
|
92
92
|
if (typeof document === "undefined") return;
|
|
93
|
+
if (NoJS._initialized) return;
|
|
94
|
+
NoJS._initialized = true;
|
|
93
95
|
root = root || document.body;
|
|
94
96
|
_log("Initializing...");
|
|
95
97
|
|
|
@@ -170,7 +172,7 @@ const NoJS = {
|
|
|
170
172
|
if (_config.i18n.persist && typeof localStorage !== "undefined") {
|
|
171
173
|
try {
|
|
172
174
|
const saved = localStorage.getItem("nojs-locale");
|
|
173
|
-
if (saved
|
|
175
|
+
if (saved) { _i18n._locale = saved; return; }
|
|
174
176
|
} catch (_) {}
|
|
175
177
|
}
|
|
176
178
|
|
|
@@ -216,7 +218,7 @@ const NoJS = {
|
|
|
216
218
|
resolve,
|
|
217
219
|
|
|
218
220
|
// Version
|
|
219
|
-
version: "1.4.
|
|
221
|
+
version: "1.4.3",
|
|
220
222
|
};
|
|
221
223
|
|
|
222
224
|
export default NoJS;
|