Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Adds checks to avoid errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ravewebdev committed Jun 3, 2021
1 parent 6f9453f commit 23d8e02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/blocks/Gutenberg/BlockButton/BlockButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ export default function BlockButton({
}

// Extract button style.
const styleOutline = className.includes('is-style-outline')
const styleOutline = className && className.includes('is-style-outline')

// Remove styles from className.
className.replace('is-style-outline', '').replace('is-style-fill', '')
className &&
className.replace('is-style-outline', '').replace('is-style-fill', '')

return (
<Button
Expand Down

0 comments on commit 23d8e02

Please sign in to comment.