If bounds was not found in style, shared.js would calculate the default center from the bounds in TileJSON. However, if bounds was not in TileJSON, an error occurred. This fixes that error by checking if the bounds exist before trying to calculate the center.
Type of Pull Request
[ ] Adding a feature
[x] Fixing a bug
[ ] Maintaining documents
[ ] Others ()
Verify the followings
[x] Code is up-to-date with the main branch
[x] No build errors after npm run build
[x] No lint errors after npm run lint
[x] No errors on using charites help globally
[x] Make sure all the existing features working well
[ ] Have you added at least one unit test if you are going to add new feature?
Description
If bounds was not found in style, shared.js would calculate the default center from the bounds in TileJSON. However, if bounds was not in TileJSON, an error occurred. This fixes that error by checking if the bounds exist before trying to calculate the center.
Type of Pull Request
Verify the followings
main
branchnpm run build
npm run lint
charites help
globally