Fixed #329: Editor showing duplicate key warnings for keys defined on the Object prototype, like `toString` and `watch`
This commit is contained in:
parent
cee259f2a5
commit
8913ce1f6f
|
@ -3,6 +3,12 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet released, version 5.5.9
|
||||
|
||||
- Fixed #329: Editor showing duplicate key warnings for keys defined on the
|
||||
Object prototype, like `toString` and `watch`.
|
||||
|
||||
|
||||
## 2016-09-27, version 5.5.8
|
||||
|
||||
- Fixed #314: JSON schema validation throwing an error "Unexpected token ' in
|
||||
|
|
|
@ -1416,7 +1416,7 @@ Node.prototype.validate = function () {
|
|||
var duplicateKeys = [];
|
||||
for (var i = 0; i < this.childs.length; i++) {
|
||||
var child = this.childs[i];
|
||||
if (keys[child.field]) {
|
||||
if (keys.hasOwnProperty(child.field)) {
|
||||
duplicateKeys.push(child.field);
|
||||
}
|
||||
keys[child.field] = true;
|
||||
|
|
Loading…
Reference in New Issue