Fixed #826: editor not allowing indentation `0`
This commit is contained in:
parent
8e15be0f12
commit
43e0c129ec
|
@ -7,6 +7,7 @@ https://github.com/josdejong/jsoneditor
|
||||||
|
|
||||||
- Fixed #828: do not expand/collapse when clicking the text of a node in modes
|
- Fixed #828: do not expand/collapse when clicking the text of a node in modes
|
||||||
`view` or `form`.
|
`view` or `form`.
|
||||||
|
- Fixed #826: editor not allowing indentation `0`.
|
||||||
|
|
||||||
|
|
||||||
## 2019-10-23, version 7.2.0
|
## 2019-10-23, version 7.2.0
|
||||||
|
|
|
@ -47,7 +47,7 @@ previewmode.create = function (container, options = {}) {
|
||||||
this.options = options
|
this.options = options
|
||||||
|
|
||||||
// indentation
|
// indentation
|
||||||
if (options.indentation) {
|
if (typeof options.indentation === 'number') {
|
||||||
this.indentation = Number(options.indentation)
|
this.indentation = Number(options.indentation)
|
||||||
} else {
|
} else {
|
||||||
this.indentation = 2 // number of spaces
|
this.indentation = 2 // number of spaces
|
||||||
|
|
|
@ -49,7 +49,7 @@ textmode.create = function (container, options = {}) {
|
||||||
this.options = options
|
this.options = options
|
||||||
|
|
||||||
// indentation
|
// indentation
|
||||||
if (options.indentation) {
|
if (typeof options.indentation === 'number') {
|
||||||
this.indentation = Number(options.indentation)
|
this.indentation = Number(options.indentation)
|
||||||
} else {
|
} else {
|
||||||
this.indentation = 2 // number of spaces
|
this.indentation = 2 // number of spaces
|
||||||
|
|
Loading…
Reference in New Issue