Skip to content

Commit ee05bcc

Browse files
committed
Fix DM screen crash: guard hk-pane slot passthrough scope
hk-pane forwards its slots through q-scroll-area with v-bind="scope". When a forwarded slot is invoked without props, scope is undefined and guardReactiveProps(undefined) returns null, so renderSlot reads null.key and the whole campaign DM screen dies with 'Cannot read properties of null (reading key)'. Bind scope || {} like hk-select already does. Not caught by the route audits because hk-pane only renders on the auth-gated Run Campaign / Run Encounter screens. https://claude.ai/code/session_013pNZHMppjJ2iGVjxjHKkpQ
1 parent b126e9e commit ee05bcc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/components/hk-components/hk-pane.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<Pane v-bind="$attrs">
33
<q-scroll-area :dark="$store.getters.theme === 'dark'" :thumb-style="{ width: '5px' }">
44
<template v-for="slot in Object.keys($slots)" v-slot:[slot]="scope">
5-
<slot :name="slot" v-bind="scope" />
5+
<!-- scope is undefined when the slot is invoked without props;
6+
v-bind of a nullish value makes renderSlot throw (null.key) -->
7+
<slot :name="slot" v-bind="scope || {}" />
68
</template>
79
</q-scroll-area>
810
</Pane>

0 commit comments

Comments
 (0)