Skip to content

Commit

Permalink
No need for fallback for required and validate arg
Browse files Browse the repository at this point in the history
We know that `type` can’t be missing or falsy, so we can skip the check.
  • Loading branch information
nb committed Jun 9, 2020
1 parent 30447b2 commit aa335aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/wordcount/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function loadSettings( type, userSettings ) {
);
}

settings.type = type || settings.l10n?.type;
settings.type = type;

if (
settings.type !== 'characters_excluding_spaces' &&
Expand Down

0 comments on commit aa335aa

Please sign in to comment.