Commit 253f20cf authored by Boris Kocherov's avatar Boris Kocherov

undefined value can be used for render

parent d72ead8f
......@@ -598,7 +598,7 @@
.declareMethod('render', function (options) {
return this.changeState({
key: options.key,
value: JSON.stringify(options.value) || '""',
value: JSON.stringify(options.value),
schema: JSON.stringify(options.schema),
saveOrigValue: options.saveOrigValue,
schema_url: options.schema_url,
......@@ -607,8 +607,11 @@
})
.onStateChange(function () {
var g = this,
json_document = JSON.parse(g.state.value),
json_document = g.state.value,
schema;
if (json_document !== undefined) {
json_document = JSON.parse(json_document);
}
if (g.state.schema !== undefined) {
schema = JSON.parse(g.state.schema);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment