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 variable repurposing and out-of-order conditional #3369

Merged
merged 1 commit into from
Oct 14, 2016

Conversation

jfirebaugh
Copy link
Contributor

@jfirebaugh jfirebaugh commented Oct 14, 2016

The layer variable was being used for both style layers and source layers. As a result, the fact that the version === 1 conditional was being checked at the wrong point went unnoticed.

The if (layer) conditional was also misplaced, but fortunately it didn't matter because the prior loop already skips style layers whose source layer does not exist.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • manually test the debug page

The `layer` variable was being used for both style layers and source layers. As a result, the fact that the `version === 1` conditional was being checked at the wrong point went unnoticed.

The `if (layer)` conditional was also misplaced, but fortunately it didn't matter because the prior loop already skips style layers whose source layer does not exist.
@mourner mourner merged commit f3ac2e5 into master Oct 14, 2016
@mourner mourner deleted the layer-vs-sourceLayer branch October 14, 2016 10:34
jfirebaugh added a commit that referenced this pull request Oct 14, 2016
* WorkerTile#parse skips layers without a corresponding source layer
* WorkerTile#parse warns once when encountering a v1 vector tile layer

Covering the issues fixed in #3369

While here, rewrite the existing tests to conform more closely with our test guidelines. (Though technically they still mock domain objects.)
@jfirebaugh jfirebaugh mentioned this pull request Oct 14, 2016
jfirebaugh added a commit that referenced this pull request Oct 14, 2016
* WorkerTile#parse skips layers without a corresponding source layer
* WorkerTile#parse warns once when encountering a v1 vector tile layer

Covering the issues fixed in #3369

While here, rewrite the existing tests to conform more closely with our test guidelines. (Though technically they still mock domain objects.)
jfirebaugh added a commit that referenced this pull request Oct 14, 2016
* WorkerTile#parse skips layers without a corresponding source layer
* WorkerTile#parse warns once when encountering a v1 vector tile layer

Covering the issues fixed in #3369

While here, rewrite the existing tests to conform more closely with our test guidelines. (Though technically they still mock domain objects.)
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

Successfully merging this pull request may close these issues.

2 participants