@kizmann/pico-js 0.3.29 → 0.3.30

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": "@kizmann/pico-js",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "author": "Eduard Kizmann <kizmann@protonmail.ch>",
@@ -27,8 +27,11 @@ export class Obj
27
27
  keys = keys.join('.');
28
28
  }
29
29
 
30
- let undef = typeof obj === 'object' && (obj[keys] === null ||
31
- obj[keys] === undefined);
30
+ let undef = true;
31
+
32
+ if ( typeof obj === 'object' ) {
33
+ undef = obj[keys] === null || obj[keys] === undefined
34
+ }
32
35
 
33
36
  if ( ! undef ) {
34
37
  return obj[keys];
@@ -67,8 +70,11 @@ export class Obj
67
70
  keys = keys.toString();
68
71
  }
69
72
 
70
- let undef = typeof obj === 'object' && (obj[keys] !== null ||
71
- obj[keys] !== undefined);
73
+ let undef = true;
74
+
75
+ if ( typeof obj === 'object' ) {
76
+ undef = obj[keys] === null || obj[keys] === undefined
77
+ }
72
78
 
73
79
  if ( ! undef ) {
74
80
  obj[keys] = val; return obj;