@vettvangur/vanilla 0.0.49 → 0.0.50
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/dom.esm.js +0 -1
- package/dist/index.esm.js +6 -1
- package/dist/string.esm.js +3 -0
- package/package.json +1 -1
package/dist/dom.esm.js
CHANGED
package/dist/index.esm.js
CHANGED
|
@@ -253,6 +253,9 @@ function getTemplate(alias, templates) {
|
|
|
253
253
|
* getBlock(alias, blocks)
|
|
254
254
|
*/
|
|
255
255
|
function getBlock(alias, blocks) {
|
|
256
|
+
if (!blocks) {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
256
259
|
const block = blocks[capitalize(alias)];
|
|
257
260
|
if (!block) {
|
|
258
261
|
return null;
|
|
@@ -291,7 +294,6 @@ function isEmpty(value) {
|
|
|
291
294
|
* preloadTimeout()
|
|
292
295
|
*/
|
|
293
296
|
function preloadTimeout() {
|
|
294
|
-
console.log('PRELOAD');
|
|
295
297
|
const body = document.querySelector('.body');
|
|
296
298
|
if (!body) {
|
|
297
299
|
return;
|
|
@@ -386,6 +388,9 @@ const Umbraco = Object.freeze({
|
|
|
386
388
|
* getTranslation(key, translations)
|
|
387
389
|
*/
|
|
388
390
|
function getTranslation(key, translations) {
|
|
391
|
+
if (!translations) {
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
389
394
|
const translation = translations[key];
|
|
390
395
|
if (!translation) {
|
|
391
396
|
console.error(`[vettvangur-vanilla :: getTranslation] No translation for key ${key} found.`);
|
package/dist/string.esm.js
CHANGED
|
@@ -97,6 +97,9 @@ function isEmpty(value) {
|
|
|
97
97
|
* getTranslation(key, translations)
|
|
98
98
|
*/
|
|
99
99
|
function getTranslation(key, translations) {
|
|
100
|
+
if (!translations) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
100
103
|
const translation = translations[key];
|
|
101
104
|
if (!translation) {
|
|
102
105
|
console.error(`[vettvangur-vanilla :: getTranslation] No translation for key ${key} found.`);
|