mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Added defaultText parameter to getTiddlerText()
This commit is contained in:
parent
1326b12948
commit
3bb0490bee
@ -119,9 +119,10 @@ WikiStore.prototype.getTiddler = function(title) {
|
||||
}
|
||||
};
|
||||
|
||||
WikiStore.prototype.getTiddlerText = function(title) {
|
||||
WikiStore.prototype.getTiddlerText = function(title,defaultText) {
|
||||
defaultText = typeof defaultText === "string" ? defaultText : null;
|
||||
var t = this.getTiddler(title);
|
||||
return t instanceof Tiddler ? t.text : null;
|
||||
return t instanceof Tiddler ? t.text : defaultText;
|
||||
};
|
||||
|
||||
WikiStore.prototype.deleteTiddler = function(title) {
|
||||
|
Loading…
Reference in New Issue
Block a user