fix(editor): Stricter type check in DataStoreBreadcrumbs (no-changelog) (#18287)

This commit is contained in:
Milorad FIlipović
2025-08-13 11:12:21 +02:00
committed by GitHub
parent 9ad998d70c
commit ed2a490351

View File

@@ -17,7 +17,7 @@ type Props = {
const props = defineProps<Props>(); const props = defineProps<Props>();
const renameInput = useTemplateRef<{ forceFocus?: () => void }>('renameInput'); const renameInput = useTemplateRef('renameInput');
const dataStoreStore = useDataStoreStore(); const dataStoreStore = useDataStoreStore();
@@ -58,7 +58,7 @@ const onRename = async () => {
// Focus rename input if the action is rename // Focus rename input if the action is rename
// We need this timeout to ensure action toggle is closed before focusing // We need this timeout to ensure action toggle is closed before focusing
await nextTick(); await nextTick();
if (renameInput.value?.forceFocus) { if (renameInput.value && typeof renameInput.value.forceFocus === 'function') {
renameInput.value.forceFocus(); renameInput.value.forceFocus();
} }
}; };