From c6e0dbcc48c214c12e3e66de53f51b35d7779386 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 4 May 2023 07:17:24 +0200 Subject: [PATCH] chore: ignore error that comes from when user tries to paste something strange --- apps/app/src/react/api/clipboard/clipboard.ts | 8 +++++++- .../sidebar/timelineObj/timelineObjs/casparcg.tsx | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/app/src/react/api/clipboard/clipboard.ts b/apps/app/src/react/api/clipboard/clipboard.ts index b81b9fbf..8e199109 100644 --- a/apps/app/src/react/api/clipboard/clipboard.ts +++ b/apps/app/src/react/api/clipboard/clipboard.ts @@ -67,7 +67,13 @@ export function setupClipboard(context: ClipBoardContext): void { } } }) - .catch(context.handleError) + .catch((error) => { + if (`${error}`.match(/no valid data/i)) { + // This is a user error, not something we need to handle. + return + } + context.handleError(error) + }) }) ) } diff --git a/apps/app/src/react/components/sidebar/timelineObj/timelineObjs/casparcg.tsx b/apps/app/src/react/components/sidebar/timelineObj/timelineObjs/casparcg.tsx index 68b59a40..dd747203 100644 --- a/apps/app/src/react/components/sidebar/timelineObj/timelineObjs/casparcg.tsx +++ b/apps/app/src/react/components/sidebar/timelineObj/timelineObjs/casparcg.tsx @@ -1954,7 +1954,6 @@ export const EditTimelineObjCasparCGAny: React.FC<{ value: m.layerId, label: m.mapping.layerName || m.layerId, })) - console.log(sourceMappingsOptions) settings = ( <>