Skip to content

Commit

Permalink
disable onClick event when button is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein authored and youknowriad committed Dec 21, 2018
1 parent e841949 commit 2bafaf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/editor/src/components/post-publish-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export class PostPublishButton extends Component {
}

const onClick = () => {
if ( isButtonDisabled ) {
return;
}
onSubmit();
onStatusChange( publishStatus );
onSave();
Expand Down

0 comments on commit 2bafaf8

Please sign in to comment.