diff --git a/packages/react-error-overlay/src/index.js b/packages/react-error-overlay/src/index.js index b09af07eee1..6f44508100e 100644 --- a/packages/react-error-overlay/src/index.js +++ b/packages/react-error-overlay/src/index.js @@ -64,7 +64,7 @@ export function startReportingRuntimeErrors(options: RuntimeReportingOptions) { ); } currentRuntimeErrorOptions = options; - listenToRuntimeErrors(errorRecord => { + stopListeningToRuntimeErrors = listenToRuntimeErrors(errorRecord => { try { if (typeof options.onError === 'function') { options.onError.call(null);