Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

John/hig-1998-apply-rrweb-commits #66

Merged
merged 3 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@highlight-run/rrweb",
"version": "1.1.14",
"version": "1.1.15",
"description": "record and replay the web",
"scripts": {
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register -r ignore-styles -r jsdom-global/register test/**.test.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/snapshot/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export function absoluteToDoc(doc: Document, attributeValue: string): string {
}

function isSVGElement(el: Element): boolean {
return el.tagName === 'svg' || el instanceof SVGElement;
return Boolean(el.tagName === 'svg' || (el as SVGElement).ownerSVGElement);
}

function getHref() {
Expand Down
3 changes: 2 additions & 1 deletion src/snapshot/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ export function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean {
// even if we can already tell from the first chunk(s) that
// the canvas isn't blank
const pixelBuffer = new Uint32Array(
originalGetImageData(
originalGetImageData.call(
ctx,
x,
y,
Math.min(chunkSize, canvas.width - x),
Expand Down