page is never null
This commit is contained in:
parent
36523cfd81
commit
08d6bdf794
|
|
@ -127,8 +127,7 @@ export class WKBrowser extends browser.Browser {
|
||||||
const context = new BrowserContext({
|
const context = new BrowserContext({
|
||||||
pages: async (): Promise<Page[]> => {
|
pages: async (): Promise<Page[]> => {
|
||||||
const pageProxies = Array.from(this._pageProxies.values()).filter(proxy => proxy._browserContext === context);
|
const pageProxies = Array.from(this._pageProxies.values()).filter(proxy => proxy._browserContext === context);
|
||||||
const pages = await Promise.all(pageProxies.map(proxy => proxy.page()));
|
return await Promise.all(pageProxies.map(proxy => proxy.page()));
|
||||||
return pages.filter(page => !!page);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
newPage: async (): Promise<Page> => {
|
newPage: async (): Promise<Page> => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue