mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Fix view format=date so that it doesn't crash on empty fields
This commit is contained in:
parent
02d3620d93
commit
c7d5905242
@ -148,7 +148,12 @@ ViewWidget.prototype.getValueAsDoubleUrlEncoded = function() {
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsDate = function(format) {
|
||||
return $tw.utils.formatDateString(this.getValue(),format);
|
||||
var value = this.getValue();
|
||||
if(value) {
|
||||
return $tw.utils.formatDateString(value,format);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
ViewWidget.prototype.getValueAsRelativeDate = function(format) {
|
||||
|
Loading…
Reference in New Issue
Block a user