Skip to content

Commit

Permalink
Merge pull request #13 from klandestino/fix-delete-all
Browse files Browse the repository at this point in the history
Fix issue where all bylines could not be removed from post
  • Loading branch information
lakrisgubben authored Nov 12, 2021
2 parents 1b00bb6 + cfaf44b commit b45b30d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/block-editor/build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-plugins'), 'version' => 'db196ea9d7a9c8ba730b010d8331265e');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-plugins'), 'version' => '46ff07f8b19f6f16ea4b71562b263edb');
2 changes: 1 addition & 1 deletion assets/block-editor/build/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/block-editor/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ const Bylines = compose( [
}
return {
onBylineChange: ( value ) => {
if ( value.length === 0 ) {
value = null;
}
editPost( { meta: { bylines: value } } );
},
onSortEnd: ( { oldIndex, newIndex } ) => {
Expand Down

0 comments on commit b45b30d

Please sign in to comment.