fix(replay): Replace _waitForError with recordingMode#6489
Merged
Conversation
_waitForError with mode_waitForError with mode
Contributor
size-limit report 📦
|
billyvg
approved these changes
Dec 9, 2022
Member
billyvg
left a comment
There was a problem hiding this comment.
Maybe recordMode to be more specific?
And ensure that `mode` is public, so it isn't mangled.
Lms24
approved these changes
Dec 12, 2022
Member
Lms24
left a comment
There was a problem hiding this comment.
l: Agree w/ Billy that recordingMode is probably a little more verbose.
Let's get this in so that we get rid of the private field. This isn't everything we have to do to fix minified CDN bundles but definitely a cleaner solution than just ignoring the private field in our terser config. Great catch!
64e5fe3 to
75e0900
Compare
Member
Author
|
👍 I changed it to |
_waitForError with mode_waitForError with recordingMode
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After checking what could be going wrong in #6466, one possible culprit is that we mangle properties prefixed with
_. Meaning that it may break when referencing such properties from outside.As far as I see, we do this in one place as of now - we access
_waitForError. So this PR refactors this.However, imho for a "public" API (of this class, at least), it is not a great API to have
waitForError, as it is a bit abstract what that means.So I changed this to instead be
mode, which can besessionorerror. I think this describes better what is going on, and makes it a bit more explicit when using this etc.