Don't queue change events for deleting non-existent tiddlers

Fixes #1919
print-window-tiddler
Jermolene 2015-08-31 15:48:32 +01:00
rodzic 684fbb1ee8
commit 709126dd64
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -885,10 +885,12 @@ $tw.Wiki = function(options) {
this.deleteTiddler = function(title) {
// Uncomment the following line for detailed logs of all tiddler deletions
// console.log("Deleting",title,tiddler)
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
if($tw.utils.hop(tiddler,title)) {
delete tiddlers[title];
this.clearCache(title);
this.clearGlobalCache();
this.enqueueTiddlerEvent(title,true);
}
};
// Get a tiddler from the store