From 8bc07ca700c674b2fe3f03377773bd0aae4c73ab Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 13 Feb 2017 16:15:38 +0200 Subject: [PATCH] chore(konsole) load: es2015-ify --- client/konsole.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/client/konsole.js b/client/konsole.js index 9c3a9d00..d8127653 100644 --- a/client/konsole.js +++ b/client/konsole.js @@ -106,17 +106,16 @@ function ConsoleProto() { }; function load(callback) { - var prefix = getPrefix(), - url = prefix + '/console.js'; + const prefix = getPrefix(); + const url = prefix + '/console.js'; - DOM.load.js(url, function(error) { - if (error) { - Dialog.alert(TITLE, error.message); - } else { - Loaded = true; - Util.timeEnd(Name + ' load'); - exec(callback); - } + DOM.load.js(url, (error) => { + if (error) + return Dialog.alert(TITLE, error.message); + + Loaded = true; + Util.timeEnd(Name + ' load'); + exec(callback); }); Util.time(Name + ' load');