diff --git a/package/contents/code/hue.js b/package/contents/code/hue.js index fa4e465..4d74a9b 100644 --- a/package/contents/code/hue.js +++ b/package/contents/code/hue.js @@ -62,8 +62,16 @@ function isInitialized () { * @return {bool} True if auth and bridge are set, otherwise false */ function getHueConfigured() { + if(!isInitialized()) { + initHueConfig(); + } + var base = plasmoid.configuration.baseURL var auth = plasmoid.configuration.authToken + if(!base || !auth) { + // something went terribly wrong here + return false; + } if (!base.trim() || !auth.trim()) { // is empty or whitespace return false; diff --git a/package/contents/ui/configActions.qml b/package/contents/ui/configActions.qml index 9587012..637f28e 100644 --- a/package/contents/ui/configActions.qml +++ b/package/contents/ui/configActions.qml @@ -410,6 +410,9 @@ Item { } Component.onCompleted: { + if(!Hue.isInitialized()) { + Hue.initHueConfig(); + } actionListModel.clear(); try {