diff --git a/plugins/billing-resources/src/components/Settings.svelte b/plugins/billing-resources/src/components/Settings.svelte index 620e9db1c7..e722be288e 100644 --- a/plugins/billing-resources/src/components/Settings.svelte +++ b/plugins/billing-resources/src/components/Settings.svelte @@ -71,7 +71,7 @@ void (async (loc: Location): Promise => { const key = loc.path[5] currentGroup = groups.find((g) => g.key === key) ?? groups[0] - currentGroupKey = currentGroup.key + currentGroupKey = currentGroup?.key })(loc) }) @@ -109,8 +109,10 @@ -
- -
+ {#if currentGroup != null} +
+ +
+ {/if} diff --git a/plugins/text-editor-resources/src/components/extension/toolbar/toolbar.ts b/plugins/text-editor-resources/src/components/extension/toolbar/toolbar.ts index 9405e844f8..cb7e1cc8e2 100644 --- a/plugins/text-editor-resources/src/components/extension/toolbar/toolbar.ts +++ b/plugins/text-editor-resources/src/components/extension/toolbar/toolbar.ts @@ -636,7 +636,7 @@ function resolveCursorPositionFromCoords (view: EditorView, coords: { left: numb function scanMarker (target: HTMLElement | null, field: string): [boolean, HTMLElement | null] { while (target != null) { - if (target.dataset[field] === 'true') { + if (target.dataset?.[field] === 'true') { return [true, target] } target = target.parentElement