Skip to content

Commit

Permalink
Chore: Fix the missing syntax issue in `@wordpress/project-management…
Browse files Browse the repository at this point in the history
…-automation`

Follow-up for #34373.
  • Loading branch information
gziolo committed Sep 1, 2021
1 parent e834828 commit 6730182
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ const isDuplicateValidationError = ( requestError ) => {
// The included version of RequestError provides no way to access the
// full 'errors' array that the github REST API returns. Hopefully they
// resolve this soon!
const errorMessage = /** @type {undefined | null | {message?: string}} */ ( requestError )
?.message;
const errorMessage =
requestError &&
typeof requestError === 'object' &&
/** @type {{message?: string}} */ ( requestError ).message;
return (
typeof errorMessage === 'string' &&
errorMessage.includes( 'already_exists' )
Expand Down

0 comments on commit 6730182

Please sign in to comment.