summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/js/json-schema.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/bg/js/json-schema.js b/ext/bg/js/json-schema.js
index adb71fa3..ea1531ab 100644
--- a/ext/bg/js/json-schema.js
+++ b/ext/bg/js/json-schema.js
@@ -637,7 +637,8 @@ class JsonSchemaValidator {
if (propertySchema === null) { continue; }
info.valuePush(property, value);
info.schemaPush(property, propertySchema);
- value[property] = this._getValidValueOrDefault(propertySchema, value[property], info);
+ const hasValue = Object.prototype.hasOwnProperty.call(value, property);
+ value[property] = this._getValidValueOrDefault(propertySchema, hasValue ? value[property] : void 0, info);
info.schemaPop();
info.valuePop();
}