mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Fixed problem with relativedate field viewer
This commit is contained in:
parent
9612aac296
commit
cf15b128c1
@ -20,7 +20,7 @@ var RelativeDateViewer = function(viewMacro,tiddler,field,value) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
RelativeDateViewer.prototype.render = function() {
|
RelativeDateViewer.prototype.render = function() {
|
||||||
if(this.value === undefined) {
|
if(!this.tiddler ||this.value === undefined) {
|
||||||
return $tw.Tree.Text("");
|
return $tw.Tree.Text("");
|
||||||
} else {
|
} else {
|
||||||
this.relativeDate = $tw.utils.getRelativeDate((new Date()) - this.value);
|
this.relativeDate = $tw.utils.getRelativeDate((new Date()) - this.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user