@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/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -1
- package/src/utility/object.js +10 -4
package/package.json
CHANGED
package/src/utility/object.js
CHANGED
@@ -27,8 +27,11 @@ export class Obj
|
|
27
27
|
keys = keys.join('.');
|
28
28
|
}
|
29
29
|
|
30
|
-
let undef =
|
31
|
-
|
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 =
|
71
|
-
|
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;
|