@kizmann/pico-js 0.3.28 → 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 +14 -2
package/package.json
CHANGED
package/src/utility/object.js
CHANGED
@@ -27,7 +27,13 @@ export class Obj
|
|
27
27
|
keys = keys.join('.');
|
28
28
|
}
|
29
29
|
|
30
|
-
|
30
|
+
let undef = true;
|
31
|
+
|
32
|
+
if ( typeof obj === 'object' ) {
|
33
|
+
undef = obj[keys] === null || obj[keys] === undefined
|
34
|
+
}
|
35
|
+
|
36
|
+
if ( ! undef ) {
|
31
37
|
return obj[keys];
|
32
38
|
}
|
33
39
|
|
@@ -64,7 +70,13 @@ export class Obj
|
|
64
70
|
keys = keys.toString();
|
65
71
|
}
|
66
72
|
|
67
|
-
|
73
|
+
let undef = true;
|
74
|
+
|
75
|
+
if ( typeof obj === 'object' ) {
|
76
|
+
undef = obj[keys] === null || obj[keys] === undefined
|
77
|
+
}
|
78
|
+
|
79
|
+
if ( ! undef ) {
|
68
80
|
obj[keys] = val; return obj;
|
69
81
|
}
|
70
82
|
|