Fix #657: `onClassName` throwing an error when a node is removed
This commit is contained in:
parent
c28cef0a9a
commit
53a4f57dda
|
@ -8,6 +8,7 @@ https://github.com/josdejong/jsoneditor
|
||||||
- Improved JSON schema titles on fields. Fixes #321. Thanks @AdamVig.
|
- Improved JSON schema titles on fields. Fixes #321. Thanks @AdamVig.
|
||||||
- Added Simplified Chinese localization. Thanks @long2ice.
|
- Added Simplified Chinese localization. Thanks @long2ice.
|
||||||
- Added Turkish localization. Thanks @beratpostalci.
|
- Added Turkish localization. Thanks @beratpostalci.
|
||||||
|
- Fix #657: `onClassName` throwing an error when a node is removed.
|
||||||
|
|
||||||
|
|
||||||
## 2019-01-23, version 5.28.2
|
## 2019-01-23, version 5.28.2
|
||||||
|
|
|
@ -932,7 +932,7 @@ Node.prototype._updateCssClassName = function () {
|
||||||
|
|
||||||
Node.prototype.recursivelyUpdateCssClassesOnNodes = function () {
|
Node.prototype.recursivelyUpdateCssClassesOnNodes = function () {
|
||||||
this._updateCssClassName();
|
this._updateCssClassName();
|
||||||
if (this.childs !== 'undefined') {
|
if (Array.isArray(this.childs)) {
|
||||||
for (var i = 0; i < this.childs.length; i++) {
|
for (var i = 0; i < this.childs.length; i++) {
|
||||||
this.childs[i].recursivelyUpdateCssClassesOnNodes();
|
this.childs[i].recursivelyUpdateCssClassesOnNodes();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue