Skip to content
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

Crafty server library (0.5.3) uses wrong type check for Crafty.timer.stop() #23

Open
skysyk opened this issue Sep 9, 2016 · 1 comment

Comments

@skysyk
Copy link

skysyk commented Sep 9, 2016

For the Crafty server library, the type check for tick on line 889 should be for "object" instead of "number" since setInterval returns an object in Node.js.

@skysyk skysyk changed the title Crafty server library (0.5.3) uses wrong type check for Crafty.timer.stop() Crafty server library (0.5.3) uses wrong type check for Crafty.timer.stop() bug Sep 9, 2016
@skysyk skysyk changed the title Crafty server library (0.5.3) uses wrong type check for Crafty.timer.stop() bug Crafty server library (0.5.3) uses wrong type check for Crafty.timer.stop() Sep 9, 2016
@mk-pmb
Copy link

mk-pmb commented Sep 9, 2016

The Node.js API docs on timers, section unref describe "The opaque value returned by setTimeout and setInterval", so I guess crafty should have the least expectations possible, because I understand "opaque" as "don't rely on (or even care about) specifics of the implementation". I usually only check truthiness on timer IDs.

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

No branches or pull requests

2 participants