Skip to content

Update normalizestyles.js #24

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update normalizestyles.js #24

wants to merge 2 commits into from

Conversation

whyvez
Copy link

@whyvez whyvez commented Jun 23, 2016

Add ability to have rgb based colors.

Add ability to have rgb based colors.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 88.235% when pulling cad4427 on tesera:master into 6f99f8d on mapbox:master.

Forgot one change when copy pasted.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.7%) to 88.235% when pulling e4fbd38 on tesera:master into 6f99f8d on mapbox:master.

@@ -46,8 +53,14 @@ function normalizeFilled(properties) {

function normalizePoint(properties) {
if (!markersize.test(properties['marker-size'])) delete properties['marker-size'];
if (!hexcolor.test(properties['marker-color'])) delete properties['marker-color'];
if (properties['marker-color'] && properties['marker-color'][0] !== '#') properties['marker-color'] = '#' + properties['marker-color'];
if (typeof properties['marker-color'] !== 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you don't need the typeof, since you're referring to a property of a defined object. you can write

if (properties['marker-color'] !== undefined) {

Instead

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.

3 participants