Fix boolean and index pattern editors in advanced settings.
This commit is contained in:
parent
57d2bb4438
commit
47142af7a0
|
@ -47,7 +47,7 @@ define(function (require) {
|
|||
|
||||
var editor = getEditorType(conf);
|
||||
conf.json = editor === 'json';
|
||||
conf.bool = editor === 'bool';
|
||||
conf.bool = editor === 'boolean';
|
||||
conf.array = editor === 'array';
|
||||
conf.normal = editor === 'normal';
|
||||
conf.tooComplex = !editor;
|
||||
|
|
|
@ -15,7 +15,7 @@ define(function (require) {
|
|||
return 'array';
|
||||
}
|
||||
|
||||
return (typeof def.value);
|
||||
return (def.value != null ? typeof def.value : typeof value);
|
||||
}
|
||||
|
||||
return getValType;
|
||||
|
|
|
@ -26,6 +26,10 @@ define(function (require) {
|
|||
expect(getValType({value: 'someString'})).to.be('string');
|
||||
expect(getValType({value: 'someString'}, 42)).to.be('string');
|
||||
});
|
||||
|
||||
it('should return the type of the value if the default value is null', function () {
|
||||
expect(getValType({value: null}, 'someString')).to.be('string');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue