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
|
||||
`view` or `form`.
|
||||
- Fixed #826: editor not allowing indentation `0`.
|
||||
|
||||
|
||||
## 2019-10-23, version 7.2.0
|
||||
|
|
|
@ -47,7 +47,7 @@ previewmode.create = function (container, options = {}) {
|
|||
this.options = options
|
||||
|
||||
// indentation
|
||||
if (options.indentation) {
|
||||
if (typeof options.indentation === 'number') {
|
||||
this.indentation = Number(options.indentation)
|
||||
} else {
|
||||
this.indentation = 2 // number of spaces
|
||||
|
|
|
@ -49,7 +49,7 @@ textmode.create = function (container, options = {}) {
|
|||
this.options = options
|
||||
|
||||
// indentation
|
||||
if (options.indentation) {
|
||||
if (typeof options.indentation === 'number') {
|
||||
this.indentation = Number(options.indentation)
|
||||
} else {
|
||||
this.indentation = 2 // number of spaces
|
||||
|
|
Loading…
Reference in New Issue