mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-09 18:36:35 +00:00
Fix custom card documentation url (#15439)
Fix custom card documentation
This commit is contained in:
parent
714c6aab98
commit
1c5b476bda
@ -154,7 +154,7 @@ const _lazyCreate = <T extends keyof CreateElementConfigTypes>(
|
||||
|
||||
const _getCustomTag = (type: string) =>
|
||||
type.startsWith(CUSTOM_TYPE_PREFIX)
|
||||
? type.substr(CUSTOM_TYPE_PREFIX.length)
|
||||
? type.slice(CUSTOM_TYPE_PREFIX.length)
|
||||
: undefined;
|
||||
|
||||
export const createLovelaceElement = <T extends keyof CreateElementConfigTypes>(
|
||||
|
@ -10,7 +10,8 @@ export const getCardDocumentationURL = (
|
||||
type: string
|
||||
): string | undefined => {
|
||||
if (type.startsWith(CUSTOM_TYPE_PREFIX)) {
|
||||
return getCustomCardEntry(type)?.documentationURL;
|
||||
return getCustomCardEntry(type.slice(CUSTOM_TYPE_PREFIX.length))
|
||||
?.documentationURL;
|
||||
}
|
||||
|
||||
return `${documentationUrl(hass, "/lovelace/")}${type}`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user