MOBILE-2915 desktop: Fix password change opened only once
parent
daa34a7caa
commit
9181455ffd
|
@ -224,6 +224,7 @@ export class InAppBrowserObjectMock {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!this.window.isDestroyed() && !this.window.webContents.isDestroyed()) {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case 'loadstart':
|
case 'loadstart':
|
||||||
this.window.webContents.on('did-start-loading', received);
|
this.window.webContents.on('did-start-loading', received);
|
||||||
|
@ -246,9 +247,15 @@ export class InAppBrowserObjectMock {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (): void => {
|
return (): void => {
|
||||||
// Unsubscribing. We need to remove the listeners.
|
// Unsubscribing. We need to remove the listeners.
|
||||||
|
if (this.window.isDestroyed() || this.window.webContents.isDestroyed()) {
|
||||||
|
// Page has been destroyed already, no need to remove listeners.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
case 'loadstart':
|
case 'loadstart':
|
||||||
this.window.webContents.removeListener('did-start-loading', received);
|
this.window.webContents.removeListener('did-start-loading', received);
|
||||||
|
|
Loading…
Reference in New Issue