# HG changeset patch # User nanaya # Date 1602321297 -32400 # Node ID 46ed68bf9918edee8a006115635795209143afa4 # Parent 7a20b49062671e60da564965059138216a50dfa8 Add more length check diff -r 7a20b4906267 -r 46ed68bf9918 app/javascript/src/main.coffee --- 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()