Beakerboy / Beakerboy/OSMBuilding

Roof direction check for skillion

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
99
Forks
11
PR merge metrics
No merged PRs in 30d

Description

The `!this.options.roof.direction` should instead check for `null`/`undefined`:
https://github.com/Beakerboy/OSMBuilding/blob/228874c2e9cfeb80f8619d52591ab5bbe85a1789/src/buildingpart.js#L179

In JavaScript, `0` is nullish, causing this warning to be printed, if you set the direction of a skillion roof to `0` (north-facing roof).

### Expected behavior:
Since `0` is an acceptable roof direction, no warning should be printed.

### Impact:
Minor, since I think it only causes a warning.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.