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

fix: highlighter error #213

Merged
merged 1 commit into from
Jan 6, 2023
Merged

Conversation

kineticjs
Copy link
Contributor

Fixes #212

Findings:
When the DevTools is closed and reopened, the content script containing the highlighter is reloaded
=> the value of _hightlighter global var is overwritten
=> the code in the setDimension function that accesses the _hightlighter by closure cannot find the reference anymore

Solution:
Made the highlighter Singleton and defined _hightlighter as a private field of its single object, to allow referencing it by this._highlighter, rather than closure

@kineticjs kineticjs marked this pull request as ready for review December 16, 2022 16:38
@kineticjs kineticjs force-pushed the refactor-highlighter branch from 76417e8 to 6816c57 Compare January 6, 2023 15:55
@kineticjs kineticjs force-pushed the refactor-highlighter branch from 6816c57 to f94bbd8 Compare January 6, 2023 15:57
@kineticjs kineticjs merged commit 9ee2efe into SAP:master Jan 6, 2023
@github-actions
Copy link
Contributor

🎉 This PR is included in version 1.4.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error from highlighter
2 participants