Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

Revert "fix(inspector): fix leaking event listeners (#22535)" (#22545)

Andrey Lushnikova56f97fcefb8
diff --git a/packages/web/src/components/codeMirrorWrapper.tsx b/packages/web/src/components/codeMirrorWrapper.tsx
index 1010210478..5ff1ab69f3 100644
--- a/packages/web/src/components/codeMirrorWrapper.tsx
+++ b/packages/web/src/components/codeMirrorWrapper.tsx
@@ -107,7 +107,7 @@ export const CodeMirrorWrapper: React.FC<SourceProps> = ({
React.useEffect(() => {
if (!codemirror)
return;
- codemirror.off('change', (codemirror as any)[listenerSymbol]);
+ codemirror.off('change', (codemirror as any).listenerSymbol);
(codemirror as any)[listenerSymbol] = undefined;
if (onChange) {
(codemirror as any)[listenerSymbol] = () => onChange(codemirror.getValue());