diff --git a/ldf.js b/ldf.js index 2a8d8de..a919363 100644 --- a/ldf.js +++ b/ldf.js @@ -8,6 +8,9 @@ var ldf = { end: undefined, hash: true, nav: function (location) { + if (location.startsWith("javascript:")) { + return; + } if (ldf.hash && !location.startsWith("#")) { location = "#" + location; if (location == "#/") { @@ -39,7 +42,7 @@ var ldf = { loc += document.location.search || ""; } ldf.helpers.request(loc, function (succ, content) { - if (succ && ldf.notfound !== undefined) { + if (succ || ldf.notfound == undefined) { ldf.change(selector, content); } else { ldf.change(selector, ldf.notfound);