| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
enable() currently wipes names/skips, so DEBUG=foo followed by
enable("bar") disables foo. Merge incoming namespaces with the
existing set. Call disable() first when replacement is intended.
Fixes debug-js#425
| Back | FazBrowse Home | New Git URL |
debug.enable() currently clears names/skips before applying the new list. That means previously enabled namespaces (including those from DEBUG) disappear:
This also breaks independent enable() calls from different modules that share one debug install.
Solution: treat enable() as additive. Incoming namespaces are merged with the existing set (skip tokens still disable a matching name; enabling a name again removes its skip). disable() still clears everything and is the way to replace:
Fixes #425