mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 20:33:02 +00:00
fix(list-box-menu-icon): use default translations if translateWithId
is undefined
Fixes #1281
This commit is contained in:
parent
39e3424b6f
commit
8ddb88af23
1 changed files with 3 additions and 1 deletions
|
@ -22,7 +22,9 @@
|
||||||
[translationIds.open]: "Open menu",
|
[translationIds.open]: "Open menu",
|
||||||
};
|
};
|
||||||
|
|
||||||
$: description = open ? translateWithId("close") : translateWithId("open");
|
$: translationId = open ? translationIds.close : translationIds.open;
|
||||||
|
$: description =
|
||||||
|
translateWithId?.(translationId) ?? defaultTranslations[translationId];
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue