From 126132967843a999a47d910bbf525aa8256c75a8 Mon Sep 17 00:00:00 2001 From: Chris Whong Date: Thu, 19 Jan 2023 17:12:49 -0500 Subject: [PATCH] fix copy button ssr bug --- src/components/copy-button/copy-button.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/copy-button/copy-button.tsx b/src/components/copy-button/copy-button.tsx index 6e470bca..56d5e680 100644 --- a/src/components/copy-button/copy-button.tsx +++ b/src/components/copy-button/copy-button.tsx @@ -173,5 +173,5 @@ CopyButton.propTypes = { }; CopyButton.isCopySupported = () => { - return Clipboard.isSupported(); + return typeof window === 'undefined' ? false : Clipboard.isSupported(); };