Skip to content

added names and skips arrays erasing on enable call #409

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 4, 2017

Conversation

musikov
Copy link
Contributor

@musikov musikov commented Jan 3, 2017

Namespaces couldn't be disabled once enabled.
This PR fixed this issue.

test:

let debug = require('debug');

console.log(1, debug.enabled('test'));

debug.enable('test');
console.log(2, debug.enabled('test'));

debug.disable();
console.log(3, debug.enabled('test'));

expected print:

1 false
2 true
3 false

@coveralls
Copy link

coveralls commented Jan 3, 2017

Coverage Status

Coverage increased (+0.5%) to 63.75% when pulling a82c04f on musikov:master into ac5ccae on visionmedia:master.

@thebigredgeek thebigredgeek merged commit 1c163a4 into debug-js:master Jan 4, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants