From 5a8e8c61ea4e5bb8aa7b77bae786d9158269af37 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 13 Nov 2019 11:03:11 -0400 Subject: [PATCH] Reject connection request on window close (#7401) 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 a0a2a7ac4..7d152e4cb 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: {