1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

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.
This commit is contained in:
Mark Stacey 2019-11-13 11:03:11 -04:00 committed by GitHub
parent 4b4c00e94f
commit 5a8e8c61ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ export default class ProviderPageContainer extends PureComponent {
}) })
} }
_beforeUnload () { _beforeUnload = () => {
const { origin, rejectProviderRequestByOrigin } = this.props const { origin, rejectProviderRequestByOrigin } = this.props
this.context.metricsEvent({ this.context.metricsEvent({
eventOpts: { eventOpts: {