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:
parent
4b4c00e94f
commit
5a8e8c61ea
@ -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: {
|
||||||
|
Loading…
Reference in New Issue
Block a user