mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2025-02-17 19:30:20 -05:00
Don't go to pages that don't exist
This commit is contained in:
parent
30e6bb0828
commit
505e23beac
1 changed files with 2 additions and 0 deletions
|
@ -320,6 +320,8 @@ function showPage(path) {
|
||||||
var toShow = "#" + path;
|
var toShow = "#" + path;
|
||||||
var $toShow = $(toShow);
|
var $toShow = $(toShow);
|
||||||
|
|
||||||
|
if (!$toShow.length) return;
|
||||||
|
|
||||||
$(toHide).filter(":visible").hide();
|
$(toHide).filter(":visible").hide();
|
||||||
if (toShow != "#editor") $("#editor").css({top: "-9999px"});
|
if (toShow != "#editor") $("#editor").css({top: "-9999px"});
|
||||||
$("body > main, body > main > article").has($toShow).show();
|
$("body > main, body > main > article").has($toShow).show();
|
||||||
|
|
Loading…
Reference in a new issue