From e3f9c59cc4f7a0d5121520e18b9d4b74b4840b4f Mon Sep 17 00:00:00 2001 From: Yasuhiro SHIMIZU Date: Wed, 27 Jul 2022 21:23:18 +0900 Subject: [PATCH 1/2] ensure element exists before access it --- assets/js/main.min.js | 2 +- assets/js/partials/dark-mode.js | 5 ++++- assets/js/partials/navbar.js | 13 +++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/assets/js/main.min.js b/assets/js/main.min.js index 80b0274e9b..5ab797c379 100644 --- a/assets/js/main.min.js +++ b/assets/js/main.min.js @@ -1 +1 @@ -function createCookie(e,t,o){var n,i="";o&&((n=new Date).setTime(n.getTime()+24*o*60*60*1e3),i="; expires="+n.toUTCString()),document.cookie=`${e}=${t}${i}; path=/`}function readCookie(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n