From 0cfb7d155de9a9e82dc5c652b0414ba1ae41d2f4 Mon Sep 17 00:00:00 2001 From: sualko Date: Tue, 24 Nov 2020 11:14:00 +0100 Subject: [PATCH] fix: removal of url shortener --- ts/admin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ts/admin.ts b/ts/admin.ts index b004f17..531a1b9 100644 --- a/ts/admin.ts +++ b/ts/admin.ts @@ -79,11 +79,11 @@ $(() => { async function saveAppSettings(shortener: string) { await checkPasswordConfirmation(); - if (shortener.indexOf('https://') !== 0) { + if (shortener && shortener.indexOf('https://') !== 0) { throw 'https'; } - if (shortener.indexOf('{token}') < 0) { + if (shortener && shortener.indexOf('{token}') < 0) { throw 'token'; }