josephg / josephg/Chipmunk-js

Bug in Node js

Open
#29 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
539
Forks
59
PR merge metrics
No merged PRs in 30d

Description

If space don't have static objects, in 2565 lines in cp.js file
`if(this.root) subtreeQuery(this.root, bb, func);`
`this` - global node js object, and it have `root` property. And the condition is true, although `this` don't `cp.BBTree`. Additional check on the `this instanceof cp.BBTree` solves the problem.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect cp.js around line 2565 and reproduce the query when no static objects exist. Verify the receiver is the global Node.js object rather than a cp.BBTree, and consider the issue's suggested instance check; done means that case no longer enters the subtree query while valid cp.BBTree queries still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.