Skip to content

Commit 0463304

Browse files
committed
remove() doesnt throw
1 parent 1d90372 commit 0463304

File tree

1 file changed

+2
-11
lines changed
  • packages/feedback/src/core/components

1 file changed

+2
-11
lines changed

packages/feedback/src/core/components/Actor.ts

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { DEBUG_BUILD } from '../../util/debug-build';
21
import { DOCUMENT, TRIGGER_LABEL } from '../../constants';
32
import { createActorStyles } from './Actor.css';
43
import { FeedbackIcon } from './FeedbackIcon';
5-
import { logger } from '@sentry/core';
64

75
export interface ActorProps {
86
triggerLabel: string;
@@ -48,15 +46,8 @@ export function Actor({ triggerLabel, triggerAriaLabel, shadow, styleNonce }: Ac
4846
shadow.appendChild(el);
4947
},
5048
removeFromDom(): void {
51-
try {
52-
el.remove();
53-
style.remove();
54-
} catch {
55-
DEBUG_BUILD &&
56-
logger.error(
57-
'[Feedback] Error when trying to remove Actor from the DOM. It is not appended to the DOM yet!',
58-
);
59-
}
49+
el.remove();
50+
style.remove();
6051
},
6152
show(): void {
6253
el.ariaHidden = 'false';

0 commit comments

Comments
 (0)