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

leaked global in ENTimeLaterFormatParser #302

Closed
clocked0ne opened this issue Sep 9, 2019 · 1 comment
Closed

leaked global in ENTimeLaterFormatParser #302

clocked0ne opened this issue Sep 9, 2019 · 1 comment

Comments

@clocked0ne
Copy link

The variable index is picked up by mocha test runner when checking for leaks:

Error: global leak detected: 'index'

node_modules\chrono-node\src\parsers\en\ENTimeLaterFormatParser.js:40:15

index = match.index + preamble.length;

This should be declared using var to avoid becoming global:

var index = match.index + preamble.length;
@wanasit
Copy link
Owner

wanasit commented Jan 13, 2020

Fixed in c21fae0. Thanks for reporting this.

@wanasit wanasit closed this as completed Jan 13, 2020
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