From 37751774b3d8fdac1d253d53dce64ccfb192d8cd Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Tue, 7 Jul 2020 22:18:22 -0700 Subject: [PATCH] Handle error copying stream id to clipboard --- src/web/control.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/web/control.js b/src/web/control.js index d92857a..a997387 100644 --- a/src/web/control.js +++ b/src/web/control.js @@ -287,7 +287,11 @@ function App({ wsEndpoint }) { const handleClickId = useCallback( (streamId) => { - navigator.clipboard.writeText(streamId) + try { + navigator.clipboard.writeText(streamId) + } catch (err) { + console.warn('Unable to copy stream id to clipboard:', err) + } if (focusedInputIdx !== undefined) { handleSetView(focusedInputIdx, streamId)