Skip to content

.enabled() logic incorrectly returns true when namespace contains asterisk #741

@Qix-

Description

@Qix-
debug.disable('*');
debug.enable('foo');
assert.not(debug.enabled('bar'));
assert.not(debug.enabled('bar*')); // throws; returns true

Has to be solved in two ways:

  • More stringent checks on namespaces (as they shouldn't contain asterisks)
  • Remove the check for ns[ns.length-1]==='*', which makes absolutely no sense

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue identifies a malfunctioninvalidThis issue is out of scope or has been deemed invalid

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions