browserclaw 0.11.1 → 0.11.2
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.
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1207,11 +1207,14 @@ function safeWriteJson(filePath, data) {
|
|
|
1207
1207
|
function setDeep(obj, keys, value) {
|
|
1208
1208
|
let node = obj;
|
|
1209
1209
|
for (const key of keys.slice(0, -1)) {
|
|
1210
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") return;
|
|
1210
1211
|
const next = node[key];
|
|
1211
1212
|
if (typeof next !== "object" || next === null || Array.isArray(next)) node[key] = {};
|
|
1212
1213
|
node = node[key];
|
|
1213
1214
|
}
|
|
1214
|
-
|
|
1215
|
+
const lastKey = keys[keys.length - 1];
|
|
1216
|
+
if (lastKey === "__proto__" || lastKey === "constructor" || lastKey === "prototype") return;
|
|
1217
|
+
node[lastKey] = value;
|
|
1215
1218
|
}
|
|
1216
1219
|
function parseHexRgbToSignedArgbInt(hex) {
|
|
1217
1220
|
const cleaned = hex.trim().replace(/^#/, "");
|