Skip to content

Commit 7b0361d

Browse files
committed
undefinedをコピーしないように
1 parent 7d47ca6 commit 7b0361d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hooks/useCopy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const useCopy = () => {
66
const DURATION = 2000;
77

88
const copy = (text?: string) => async () => {
9-
if (text.trim() === '') {
9+
if (!text || text.trim() === '') {
1010
toaster.push(
1111
<Message showIcon type="warning">
1212
コピーする内容がありません。

0 commit comments

Comments
 (0)