@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 CHANGED
@@ -22,7 +22,6 @@
22
22
  * preloadTimeout()
23
23
  */
24
24
  function preloadTimeout() {
25
- console.log('PRELOAD');
26
25
  const body = document.querySelector('.body');
27
26
  if (!body) {
28
27
  return;
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.`);
@@ -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.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vettvangur/vanilla",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "Vettvangur | Vanilla JS Utility Library",
5
5
  "access": "public",
6
6
  "type": "module",