@contentful/field-editor-rich-text 2.3.7 → 2.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/field-editor-rich-text.cjs.development.js +4 -0
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +4 -0
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/package.json +3 -3
|
@@ -366,6 +366,10 @@ var _constate = /*#__PURE__*/constate(useSdk),
|
|
|
366
366
|
var useCommandList = function useCommandList(commandItems, container) {
|
|
367
367
|
var _React$useState = useState(function () {
|
|
368
368
|
// select the first item on initial render
|
|
369
|
+
if (!commandItems.length) {
|
|
370
|
+
return '';
|
|
371
|
+
}
|
|
372
|
+
|
|
369
373
|
if ('group' in commandItems[0]) {
|
|
370
374
|
return commandItems[0].commands[0].id;
|
|
371
375
|
}
|