We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d44de69 commit ba74245Copy full SHA for ba74245
1 file changed
packages/super-editor/src/components/toolbar/ButtonGroup.vue
@@ -71,7 +71,12 @@ const isSeparator = (item) => item.type === 'separator';
71
const isOverflow = (item) => item.type === 'overflow';
72
73
const getExpanded = (item) => {
74
- return Boolean(item?.expand?.value);
+ if (!item) return false;
75
+ const expand = item.expand;
76
+ if (typeof expand === 'object' && expand !== null && 'value' in expand) {
77
+ return Boolean(expand.value);
78
+ }
79
+ return Boolean(expand);
80
};
81
82
const setExpanded = (item, open) => {
0 commit comments