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