mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-19 06:45:53 +08:00
fix: bug in pptr injections
This commit is contained in:
parent
e551695d17
commit
c19ca2147c
@ -271,7 +271,7 @@ function getMaxDepthAndCountUsingTreeWalker(root) {
|
||||
root,
|
||||
NodeFilter.SHOW_ELEMENT,
|
||||
(node) => {
|
||||
const nodeName = node.nodeName.toLowerCase();
|
||||
const nodeName = node.nodeName?.toLowerCase();
|
||||
return (nodeName === 'svg') ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
||||
},
|
||||
false
|
||||
@ -1102,7 +1102,7 @@ export class PuppeteerControl extends AsyncService {
|
||||
snapshot.childFrames = await pSubFrameSnapshots;
|
||||
}
|
||||
} catch (err: any) {
|
||||
this.logger.warn(`Page ${sn}: Failed to finalize ${url}`, { err: marshalErrorLike(err) });
|
||||
this.logger.warn(`Page ${sn}: Failed to finalize ${url}`, { err });
|
||||
if (stuff instanceof Error) {
|
||||
finalized = true;
|
||||
throw stuff;
|
||||
|
Loading…
x
Reference in New Issue
Block a user