Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix variable repurposing and out-of-order conditional (#3369)
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.
- Loading branch information