1
0
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:
Jeremy Ruston 2012-11-11 14:40:49 +00:00
parent 9612aac296
commit cf15b128c1

View File

@ -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);