@schukai/monster 3.51.1 → 3.51.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schukai/monster",
3
- "version": "3.51.1",
3
+ "version": "3.51.2",
4
4
  "description": "Monster is a simple library for creating fast, robust and lightweight websites.",
5
5
  "keywords": [
6
6
  "framework",
@@ -64,8 +64,12 @@ function initOptionsFromAttributes(element, options, mapping = {}, prefix = "dat
64
64
  value = mapping[optionName](value);
65
65
  }
66
66
 
67
- const typeOfOptionValue = typeof finder.getVia(optionName);
68
- if (typeOfOptionValue === "boolean") {
67
+ const optionValue = finder.getVia(optionName);
68
+
69
+ const typeOfOptionValue = typeof optionValue;
70
+ if (optionValue === null || optionValue === undefined) {
71
+ value = null;
72
+ } else if (typeOfOptionValue === "boolean") {
69
73
  value = value === "true";
70
74
  } else if (typeOfOptionValue === "number") {
71
75
  value = Number(value);
@@ -142,7 +142,7 @@ function getMonsterVersion() {
142
142
  }
143
143
 
144
144
  /** don't touch, replaced by make with package.json version */
145
- monsterVersion = new Version("3.51.1");
145
+ monsterVersion = new Version("3.51.2");
146
146
 
147
147
  return monsterVersion;
148
148
  }
@@ -7,7 +7,7 @@ describe('Monster', function () {
7
7
  let monsterVersion
8
8
 
9
9
  /** don´t touch, replaced by make with package.json version */
10
- monsterVersion = new Version("3.51.1")
10
+ monsterVersion = new Version("3.51.2")
11
11
 
12
12
  let m = getMonsterVersion();
13
13