Fix erroneous function calls

This commit is contained in:
Thomas Lovén 2018-12-12 15:02:53 +01:00
parent 521e0c4fab
commit 62c685b44d

View File

@ -57,7 +57,7 @@ if (!window.cardTools){
}; };
const _createError = (error, config) => { const _createError = (error, config) => {
return _createCard("hui-error-card", { return _createThing("hui-error-card", {
type: "error", type: "error",
error, error,
config, config,
@ -65,7 +65,7 @@ if (!window.cardTools){
}; };
if(!config || typeof config !== "object" || !config.type) if(!config || typeof config !== "object" || !config.type)
return _createErrorCard(`No ${thing} type configured`, config); return _createError(`No ${thing} type configured`, config);
let tag = config.type; let tag = config.type;
if(config.error) { if(config.error) {
const err = config.error; const err = config.error;