Skip to content

Commit

Permalink
Add await for editor js (#5369)
Browse files Browse the repository at this point in the history
* add await for editor js

* add changeset

---------

Co-authored-by: Paweł Chyła <[email protected]>
  • Loading branch information
szczecha and poulch committed Jan 31, 2025
1 parent e0f586e commit 52cf576
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-poems-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": patch
---

Editor.js no more cause error during saving
2 changes: 2 additions & 0 deletions src/components/RichTextEditor/ReactEditorJS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class ClientEditorCore implements EditorCore {
}

public async save() {
await this._editorJS.isReady;

return this._editorJS.save();
}

Expand Down

0 comments on commit 52cf576

Please sign in to comment.