Mercurial > zeropaste
diff app/javascript/src/main.coffee @ 478:46ed68bf9918
Add more length check
author | nanaya <me@nanaya.pro> |
---|---|
date | Sat, 10 Oct 2020 18:14:57 +0900 |
parents | 68231013b01b |
children | b493db1f40b0 |
line wrap: on
line diff
--- a/app/javascript/src/main.coffee Sat Oct 10 18:13:56 2020 +0900 +++ b/app/javascript/src/main.coffee Sat Oct 10 18:14:57 2020 +0900 @@ -74,9 +74,11 @@ switchToCurrentHash = -> - return unless $(".js-showing-paste").length + return if $(".js-showing-paste").length == 0 format = window.location.hash.slice(1) + + return if format.length == 0 $(".js-show-tab[data-mode=#{format}]").click()