diff app/javascript/src/main.coffee @ 479:b493db1f40b0

Validate format
author nanaya <me@nanaya.pro>
date Sat, 10 Oct 2020 18:16:12 +0900
parents 46ed68bf9918
children
line wrap: on
line diff
--- a/app/javascript/src/main.coffee	Sat Oct 10 18:14:57 2020 +0900
+++ b/app/javascript/src/main.coffee	Sat Oct 10 18:16:12 2020 +0900
@@ -78,7 +78,8 @@
 
   format = window.location.hash.slice(1)
 
-  return if format.length == 0
+  return unless format in ['pl', 'hl', 'md']
+
   $(".js-show-tab[data-mode=#{format}]").click()