Files
insomnia/patches/json-order+1.1.3.patch
George e906a6a0df fix(script): setting invalid value to environment value should be rejected - INS-2957 (#10249)
* fix: setting undefined to environment value should be rejected

* fix: reject setting environment value to undefined or null

* fix: comments

* fix: comments

* refactor: allow saving null to environments via script

* fix: add patch

* fix: comments
2026-08-05 11:26:19 +08:00

14 lines
593 B
Diff

diff --git a/node_modules/json-order/dist/parse.js b/node_modules/json-order/dist/parse.js
index 7d4aad8..8eda055 100644
--- a/node_modules/json-order/dist/parse.js
+++ b/node_modules/json-order/dist/parse.js
@@ -12,7 +12,7 @@ var traverseObject = function (obj, map, parentKey, separator) {
}
childKeys.forEach(function (childKey) {
var value = obj[childKey];
- if (typeof value === 'object') {
+ if (value !== null && typeof value === 'object') {
traverseObject(value, map, "" + parentKey + separator + childKey, separator);
}
});