changeset 479:b493db1f40b0

Validate format
author nanaya <me@nanaya.pro>
date Sat, 10 Oct 2020 18:16:12 +0900
parents 46ed68bf9918
children 2672acc670d2
files app/javascript/src/main.coffee
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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()