Skip to content
Prev Previous commit
Next Next commit
Add onSave to deps
Co-authored-by: Kai Hao <[email protected]>
  • Loading branch information
noisysocks and kevin940726 committed Apr 14, 2021
commit 6d697e326e808fb0693dd1abddcba51fc538783a
2 changes: 1 addition & 1 deletion packages/block-library/src/legacy-widget/edit/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function Control( { id, idBase, html, onChange, onSave } ) {
const handleSubmit = useCallback( ( event ) => {
event.preventDefault();
onSave( serializeForm( event.target ) );
}, [] );
}, [ onSave ] );

// We can't use the real widget number as this is calculated by the server
// and we may not ever *actually* save this widget. Instead, use a fake but
Expand Down