Add DetachedWindowAPI.close
calls
This commit is contained in:
parent
b667a68bd4
commit
5b282924ea
@ -241,11 +241,16 @@ export class ApRequestService {
|
|||||||
if (alternate) {
|
if (alternate) {
|
||||||
const href = alternate.getAttribute('href');
|
const href = alternate.getAttribute('href');
|
||||||
if (href) {
|
if (href) {
|
||||||
|
// Since this early exits, we need to call DetachedWindowAPI.close
|
||||||
|
await window.happyDOM.close();
|
||||||
|
|
||||||
return await this.signedGet(href, user, false);
|
return await this.signedGet(href, user, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// something went wrong parsing the HTML, ignore the whole thing
|
// something went wrong parsing the HTML, ignore the whole thing
|
||||||
|
} finally {
|
||||||
|
await window.happyDOM.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user