From a77942768afe0789d7e1773b113f007335e602f2 Mon Sep 17 00:00:00 2001 From: lubiana Date: Wed, 28 Aug 2024 17:59:21 +0200 Subject: [PATCH] uff --- index.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index b3fe46c..df537b3 100644 --- a/index.html +++ b/index.html @@ -175,12 +175,15 @@ } } - debugger; let hashParams = window.location.hash let dataPart = hashParams.replace('#data=', '') let decodedData = atob(dataPart) - let arr = JSON.parse(decodedData) - haram.harams = arr + if (decodedData.length > 0) { + let arr = JSON.parse(decodedData) + if (arr.length > 0) { + haram.harams = arr + } + } haram.setUp() document.getElementById('edit').addEventListener('click', () => { if (haram.editMode === true) {