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

Strict check on layer Name causes page hang #164

Closed
crh3675 opened this issue Dec 11, 2018 · 0 comments
Closed

Strict check on layer Name causes page hang #164

crh3675 opened this issue Dec 11, 2018 · 0 comments

Comments

@crh3675
Copy link

crh3675 commented Dec 11, 2018

We recently noticed when using a NOAA WMS feed, that our page would hang. The underlying cause was that NOAA had names such as <Name>0</Name> and <Name>1</Name> for their layers. It seems the code here:

    layers.forEach(function(current) {
        if (current.querySelector("Name").innerHTML === layerName) {
            layer = current;
        }
    })

becomes the issue due to strict type checking and should be updated as such:

    layers.forEach(function(current) {
        if (current.querySelector("Name").innerHTML === String(layerName)) {
            layer = current;
        }
    })
@crh3675 crh3675 closed this as completed Dec 11, 2018
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