Turfjs / Turfjs/turf

turf-interpolate\index.js has a bug

Open
#1,601 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

@turf/interpolate bug need-review
Dominant language
TypeScript
Stars
10.5k
Forks
1k
Avg merge
1h 11m
Merged PRs (30d)
4

Description

in line#92
if (d === 0) zw = zValue;

it should be
if (d === 0) zw += zValue;

because zw is a accumulative total, you can not directly set the value.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at turf-interpolate/index.js line 92 and inspect how zw is accumulated when d equals zero. Confirm the behavior against the surrounding interpolation logic; done means zero-distance contributions are accumulated instead of replacing the existing total.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.