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

[Bug] Overlay created using chart.createOverlay() has empty string for id #574

Open
char101 opened this issue Jul 3, 2024 · 0 comments
Open

Comments

@char101
Copy link

char101 commented Jul 3, 2024

Version

main

Steps to Reproduce

In this code

override (overlay: Partial<OverlayCreate>): void {
this._prevOverlay = clone(this._overlay)
const id = this._overlay.id
merge(this._overlay, overlay)
if (isString(id)) {
this._overlay.id = id
}

this._overlay.id is '', thus isString(id) is true, causing '' to replace back the correct id.

Thus the correct code should be

    if (isString(id) && id !== '') {
      this._overlay.id = id
    }
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

No branches or pull requests

1 participant