Edit text widgets should use default text for missing fields

index-for-list-widget
jeremy@jermolene.com 2021-03-31 14:15:01 +01:00
rodzic 55e44a9554
commit d6ea369f5e
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -103,7 +103,11 @@ function editTextWidgetFactory(toolbarEngine,nonToolbarEngine) {
var tiddler = this.wiki.getTiddler(this.editTitle);
if(tiddler) {
// If we've got a tiddler, the value to display is the field string value
value = tiddler.getFieldString(this.editField);
if(tiddler.hasField(this.editField)) {
value = tiddler.getFieldString(this.editField);
} else {
value = this.editDefault || "";
}
if(this.editField === "text") {
type = tiddler.fields.type || "text/vnd.tiddlywiki";
}