Skip to content

Commit 9831a6d

Browse files
committed
fix(expert): make togglePinWithWidth inject optional
The Expert component was crashing in the immersive editor when sending messages because it expected togglePinWithWidth to be provided by a parent component. In the immersive editor, Expert is loaded directly as a route component without the RightDrawer wrapper that provides this function. Changed the inject from array to object format with a default no-op function, allowing the component to work both in the drawer context and standalone in the immersive editor.
1 parent 02ba301 commit 9831a6d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

frontend/src/components/expert/Expert.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,12 @@ export default {
7474
ExpertRichGuide,
7575
ExpertRichResources
7676
},
77-
inject: ['togglePinWithWidth'],
77+
inject: {
78+
togglePinWithWidth: {
79+
from: 'togglePinWithWidth',
80+
default: () => () => {} // No-op function when not provided
81+
}
82+
},
7883
data () {
7984
return {
8085
scrollCheckDebounce: null,

0 commit comments

Comments
 (0)