configate 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,8 +21,9 @@ export function makeSecureDeepProxy(config) {
|
|
|
21
21
|
function makeSecureProxy(targetObject) {
|
|
22
22
|
return new Proxy(targetObject, {
|
|
23
23
|
get(target, prop) {
|
|
24
|
-
// Handle Symbol
|
|
25
|
-
if (prop ===
|
|
24
|
+
// Handle Symbol and Array properties
|
|
25
|
+
if (typeof prop === 'symbol' ||
|
|
26
|
+
// Don't throw error when using array methods
|
|
26
27
|
(Array.isArray(target) && Number.isNaN(Number(prop)))) {
|
|
27
28
|
return Reflect.get(target, prop);
|
|
28
29
|
}
|