@sendbird/actionbook-core 0.10.12 → 0.10.13

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/ui/index.js CHANGED
@@ -3501,10 +3501,14 @@ function createEmptyDocGuardPlugin() {
3501
3501
  return new Plugin2({
3502
3502
  appendTransaction(_, __, newState) {
3503
3503
  const { doc: doc2 } = newState;
3504
+ if (doc2.childCount === 0) {
3505
+ return newState.tr.insert(0, paragraph.create());
3506
+ }
3504
3507
  if (doc2.childCount !== 1) return null;
3505
3508
  const only = doc2.child(0);
3506
3509
  if (only.type === paragraph) return null;
3507
3510
  if (only.content.size !== 0) return null;
3511
+ if (only.type === heading) return null;
3508
3512
  return newState.tr.setNodeMarkup(0, paragraph);
3509
3513
  }
3510
3514
  });