diff --git a/src/ButtonPanels.tsx b/src/ButtonPanels.tsx index 93667871..3b6ecb57 100644 --- a/src/ButtonPanels.tsx +++ b/src/ButtonPanels.tsx @@ -79,10 +79,10 @@ export const EditButtons: React.FC = ({ value = data stringValue = type ? JSON.stringify(data, null, 2) : String(value) } - void navigator.clipboard.writeText(stringValue) - } - if (typeof enableClipboard === 'function') { - enableClipboard({ value, stringValue, path, key, type: copyType }) + void navigator.clipboard?.writeText(stringValue) + if (typeof enableClipboard === 'function') { + enableClipboard({ value, stringValue, path, key, type: copyType }) + } } }