From 1654f743bf54806344d621f9e87f56352add3f4f Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 22 Sep 2023 20:00:57 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20fix=20code=20formatting=20(?= =?UTF-8?q?#210)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/cookies.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/static/cookies.js b/public/static/cookies.js index 677eff7..6b55e02 100644 --- a/public/static/cookies.js +++ b/public/static/cookies.js @@ -16,8 +16,9 @@ document.addEventListener( let cookie = decodeURIComponent(document.cookie) // Set the value of the input field to the decoded cookie value if it is not empty // Otherwise, display a message indicating that no cookies have been saved on the user's system - document.querySelector('.cookies input').value = - cookie !== '' ? cookie : 'No cookies have been saved on your system' + document.querySelector('.cookies input').value = cookie.length + ? cookie + : 'No cookies have been saved on your system' } catch (error) { // If there is an error decoding the cookie, log the error to the console // and display an error message in the input field @@ -25,5 +26,5 @@ document.addEventListener( document.querySelector('.cookies input').value = 'Error decoding cookie' } }, - false + false, )