mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Jsoneditor, Correct translation for default values
This commit is contained in:
parent
cfb34e6bfc
commit
80d60c2406
@ -1839,7 +1839,14 @@ JSONEditor.AbstractEditor = Class.extend({
|
||||
this.parent = null;
|
||||
},
|
||||
getDefault: function() {
|
||||
if(this.schema["default"]) return $.i18n(this.schema["default"]);
|
||||
var def = this.schema["default"];
|
||||
if(def) {
|
||||
if (typeof def === "string") {
|
||||
return $.i18n(def);
|
||||
} else {
|
||||
return def;
|
||||
}
|
||||
}
|
||||
if(this.schema["enum"]) return this.schema["enum"][0];
|
||||
|
||||
var type = this.schema.type || this.schema.oneOf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user