mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-28 01:44:45 +00:00
Use stringified fields where possible in the view macro
This commit is contained in:
parent
90677022e5
commit
a302be82d0
@ -87,7 +87,15 @@ exports.macro = {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: // "text"
|
default: // "text"
|
||||||
return [Renderer.TextNode(value)];
|
// 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 [];
|
return [];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user