1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

[Editor] Avoid to use parent of editors in destroyed pages

This commit is contained in:
Calixte Denizet 2023-09-07 12:30:29 +02:00
parent cf5a1d60a6
commit 8ab4e2e6e7
5 changed files with 106 additions and 5 deletions

View file

@ -53,6 +53,8 @@ exports.loadAndWait = (filename, selector, zoom, pageSetup) =>
exports.closePages = pages =>
Promise.all(
pages.map(async ([_, page]) => {
// Avoid to keep something from a previous test.
await page.evaluate(() => window.localStorage.clear());
await page.close();
})
);