Skip to content

Commit

Permalink
Added rudimentary backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
elsoazemelet committed Oct 13, 2023
1 parent c846875 commit 09c7825
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions src/renderer/lib/_configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,23 @@ export function getComponentInformation({ short }) {
return undefined;
}

return config_components
.map(
(c) =>
(c = {
component: c.default,
information: c.information,
header: c.header,
})
)
.find((c) => c.information.short == short);
const comps = config_components.map(
(c) =>
(c = {
component: c.default,
information: c.information,
header: c.header,
})
);

let res = comps.find((c) => c.information.short == short);

//Backward compatibility
if (typeof res === "undefined") {
return comps.find((c) => c.information.short == "cb");
}

return res;
}

export function getAllComponents() {
Expand Down

0 comments on commit 09c7825

Please sign in to comment.