From 55000c1c866d4040854d00fd22e2ab6b487939cf Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 13 Nov 2019 09:12:08 -0400 Subject: [PATCH] Reject connection request on window close This was first implemented in #7335, but the final version didn't work because the `_beforeUnload` handler was not bound early, so `this` was not defined when it was triggered. --- .../provider-page-container.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/app/components/app/provider-page-container/provider-page-container.component.js b/ui/app/components/app/provider-page-container/provider-page-container.component.js index a0a2a7ac4a5b..7d152e4cbb49 100644 --- a/ui/app/components/app/provider-page-container/provider-page-container.component.js +++ b/ui/app/components/app/provider-page-container/provider-page-container.component.js @@ -34,7 +34,7 @@ export default class ProviderPageContainer extends PureComponent { }) } - _beforeUnload () { + _beforeUnload = () => { const { origin, rejectProviderRequestByOrigin } = this.props this.context.metricsEvent({ eventOpts: {