Editor: reinstate anonymous callback for saved post state#56529
Conversation
|
Size Change: +2 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
It seems like there was a pretty valid reason for not passing the event object in this instance - more detail here.
It was a long time ago, so may not be valid anymore, but it seems like it is safe to revert this to get tests passing again while that is investigated further.
|
TIL, and thanks for catching it so quickly! It’s my bad FWIW, since I originally suggested it in a code review. |
|
All good! 🙇🏻 |
That's a good TIL for me, as well, I'll be sure to double-check function signatures when passing function references around in future, too! |
Same. This was a good reminder, thank you @ramonjd ! |
What?
Reverts this line merged in #56502.
Why?
The savePost action in the editor store doesn't expect to be passed an event object.
See the relevant test.
How are you?
Fine thanks!
Testing Instructions
Run the tests!
npm run test:unit packages/editor/src/components/post-saved-state/test/index.js