mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-14 11:15:41 +00:00
Use stringified fields where possible in the view macro
This commit is contained in:
parent
90677022e5
commit
a302be82d0
@ -87,8 +87,16 @@ exports.macro = {
|
||||
}
|
||||
break;
|
||||
default: // "text"
|
||||
// Get the stringified version of the field value
|
||||
if(field !== "text" && tiddler) {
|
||||
value = tiddler.getFieldString(field)
|
||||
}
|
||||
if(value === undefined || value === null) {
|
||||
return [];
|
||||
} else {
|
||||
return [Renderer.TextNode(value)];
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user