diff --git a/core/modules/savers/download.js b/core/modules/savers/download.js index 0192cfd69..8d1436f29 100644 --- a/core/modules/savers/download.js +++ b/core/modules/savers/download.js @@ -26,10 +26,11 @@ DownloadSaver.prototype.save = function(text,method,callback,options) { var p = document.location.pathname.lastIndexOf("/"); if(p !== -1) { filename = document.location.pathname.substr(p+1); - } else { - filename = "tiddlywiki.html"; } } + if(!filename) { + filename = "tiddlywiki.html"; + } // Set up the link var link = document.createElement("a"); link.setAttribute("target","_blank");