Skip to content

Commit

Permalink
Merge pull request #203 from mapbox/fix-copy-button-ssr
Browse files Browse the repository at this point in the history
fix copy button ssr bug
  • Loading branch information
chriswhong authored Jan 19, 2023
2 parents f9ecaa2 + 1261329 commit d14bdad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/copy-button/copy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,5 @@ CopyButton.propTypes = {
};

CopyButton.isCopySupported = () => {
return Clipboard.isSupported();
return typeof window === 'undefined' ? false : Clipboard.isSupported();
};

0 comments on commit d14bdad

Please sign in to comment.