From 1a033eb45af1ab2d56e47d2c7517564e68e3b8b1 Mon Sep 17 00:00:00 2001 From: familyfriendlymikey Date: Tue, 23 Aug 2022 02:25:11 -0400 Subject: [PATCH] cleanup --- app/client.imba | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/client.imba b/app/client.imba index ccd56b7..c445a97 100644 --- a/app/client.imba +++ b/app/client.imba @@ -64,7 +64,15 @@ tag app catch e err "adding link", e + def load_config + try + config = JSON.parse(global.localStorage.fuzzyhome_config) + validate_config! + catch + reset_config! + def validate_config + p config throw _ if config.default_bang.id is null throw _ if config.default_bang.url is null throw _ if config.default_bang.icon is null @@ -80,13 +88,6 @@ tag app def save_config global.localStorage.fuzzyhome_config = JSON.stringify(config) - def load_config - try - config = JSON.parse(global.localStorage.fuzzyhome_config) - validate_config! - catch - reset_config! - def err s, e p e window.alert("Error {s}:\n\n{e}")