From 8ec2c6103cd24683052ad36fa732158ad176150b Mon Sep 17 00:00:00 2001 From: Nemeyteth Date: Sat, 31 Oct 2020 14:59:49 +0100 Subject: [PATCH] Added default settings object --- src/getfives.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/getfives.js b/src/getfives.js index 3a99004..9dc3b54 100644 --- a/src/getfives.js +++ b/src/getfives.js @@ -177,9 +177,9 @@ async function init(entryPoint) { isClicked = true; getSettings('settings').then((settings) => { - Settings = settings; - keyInput.value = settings.togglKey ? settings.togglKey : ''; - rateInput.value = settings.rate ? settings.rate : ''; + Settings = settings || {}; + keyInput.value = Settings.togglKey ? Settings.togglKey : ''; + rateInput.value = Settings.rate ? Settings.rate : ''; keyInput.dispatchEvent(new Event('input')); });