This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Revert "Handle query values as objects for cached parsed urls""
This reverts commit 77873c3.
- Loading branch information
d142b24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem here is that
urlParse
only returns a copy when the url is already cached. If this block gets a url that is not in the cache it will modify the cached object and all subsequent calls will get the modifiedquery
attribute. I'm going to commit a change to always return a copy, but in general I think we should avoid modifying objects that are returned from other methods unless we are intentionally creating side-effectsd142b24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can also happen because of https://github.com/brave/browser-laptop/blob/master/app/ledger.js#L1368
d142b24
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I guess ledger.js is the sole cause in this case because there wasn't an assignment before this block was added