@kystverket/styrbord 2.8.0 → 2.8.1

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/dist/style.js CHANGED
@@ -3701,7 +3701,10 @@ const W = ({
3701
3701
  return {
3702
3702
  toolbarState: A,
3703
3703
  updateToolbarState: (r) => {
3704
- const E = r.get(L3), { state: l } = E, { from: C, to: i, empty: c, $from: M } = l.selection, f = (m) => {
3704
+ const E = r.get(L3), { state: l } = E;
3705
+ if (!l)
3706
+ return;
3707
+ const { from: C, to: i, empty: c, $from: M } = l.selection, f = (m) => {
3705
3708
  const d = m.map((Q) => l.schema.marks[Q]).filter((Q) => !!Q);
3706
3709
  if (d.length === 0)
3707
3710
  return !1;