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

loadOmeTiff with relative path no longer works #756

Open
xinaesthete opened this issue Dec 1, 2023 · 0 comments
Open

loadOmeTiff with relative path no longer works #756

xinaesthete opened this issue Dec 1, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@xinaesthete
Copy link
Contributor

Describe the bug
This is fairly trivial, but it used to be possible to call something like loadOmeTiff('/api/image.ome.tiff'). This now throws an exception when it passes that string to new URL(source) (here). I can work around this at my end by being more careful about forming a working string or URL... so now in my client code I have something like this

if (source.startsWith('/')) source = new URL(source, window.location.href)
loadOmeTiff(source)

That's not a totally robust method, but a passable hack for me for now... but it was a breaking change for me when I updated to the latest Viv version, so maybe worth considering (and probably source.startsWith('/') won't catch all potential problems).

@xinaesthete xinaesthete added the bug Something isn't working label Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant