1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-06 00:38:06 +00:00

Don't load tiddlers that don't have a title

We were getting problems (eg, adding a `readme.md` to a plugin without
an accompanying `readme.md.meta` would end up creating a tiddler called
“undefined”)
This commit is contained in:
Jermolene
2014-01-12 21:48:18 +00:00
parent 19080f9958
commit b04141fefd
2 changed files with 19 additions and 11 deletions

View File

@@ -204,10 +204,12 @@ exports.addTiddler = function(tiddler) {
// Get the title
var title = tiddler.fields.title;
// Save the tiddler
this.tiddlers[title] = tiddler;
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title);
if(title) {
this.tiddlers[title] = tiddler;
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title);
}
};
/*