Skip to content

fix: tolerate undefined target - #565

Merged
raquelmsmith merged 1 commit into
masterfrom
fix/tolerate-undefined-target
Mar 2, 2023
Merged

raquelmsmith merged 1 commit into
masterfrom
fix/tolerate-undefined-target

Conversation

@raquelmsmith

@raquelmsmith raquelmsmith commented Mar 2, 2023 •

Copy link
Copy Markdown
Member

Changes

@pauldambra doesn't trust typescript and neither should I. See #563 (comment)

...

Checklist

@raquelmsmith
raquelmsmith requested a review from pauldambra March 2, 2023 22:14
@github-actions

github-actions Bot commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

Size Change: +12 B (0%)

Total Size: 2.28 MB

Filename Size Change
dist/array.full.js 152 kB +3 B (0%)
dist/array.js 93.6 kB +3 B (0%)
dist/es.js 93.4 kB +3 B (0%)
dist/module.js 93.7 kB +3 B (0%)
ℹ️ View Unchanged
Filename Size
dist/recorder-v2.js 92.5 kB
dist/recorder.js 58.3 kB
lib/rrweb/dist/plugins/console-record.js 26.6 kB
lib/rrweb/dist/plugins/console-record.min.js 10.8 kB
lib/rrweb/dist/plugins/console-replay.js 12.7 kB
lib/rrweb/dist/plugins/console-replay.min.js 5.72 kB
lib/rrweb/dist/plugins/sequential-id-record.js 910 B
lib/rrweb/dist/plugins/sequential-id-record.min.js 417 B
lib/rrweb/dist/plugins/sequential-id-replay.js 1.24 kB
lib/rrweb/dist/plugins/sequential-id-replay.min.js 578 B
lib/rrweb/dist/record/rrweb-record-pack.js 31.4 kB
lib/rrweb/dist/record/rrweb-record-pack.min.js 10.7 kB
lib/rrweb/dist/record/rrweb-record.js 140 kB
lib/rrweb/dist/record/rrweb-record.min.js 51.7 kB
lib/rrweb/dist/replay/rrweb-replay-unpack.js 188 kB
lib/rrweb/dist/replay/rrweb-replay-unpack.min.js 71.1 kB
lib/rrweb/dist/replay/rrweb-replay.js 172 kB
lib/rrweb/dist/replay/rrweb-replay.min.js 66.4 kB
lib/rrweb/dist/rrweb-all.js 356 kB
lib/rrweb/dist/rrweb-all.min.js 133 kB
lib/rrweb/dist/rrweb.js 302 kB
lib/rrweb/dist/rrweb.min.js 116 kB
lib/rrweb/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js 1.94 kB
lib/rrweb/es/rrweb/ext/mitt/dist/mitt.es.js 1.99 kB

compressed-size-action

Comment thread src/autocapture-utils.ts
export function getNestedSpanText(target: Element): string {
let text = ''
if (target.children?.length > 0) {
if (target && target.children?.length > 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a nice balance between the legible version and the paranoid version.

It's a really tricky balance. If we never trust TS then what's the point of using it, but it's JS that runs in the browser and we know that'll do the stupidest thing at least 50% of the time 🤣

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@raquelmsmith
raquelmsmith merged commit 1af1a9d into master Mar 2, 2023
@raquelmsmith
raquelmsmith deleted the fix/tolerate-undefined-target branch March 2, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants