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

fix: ensure supportsColor.level exists before stringifying it #901

Merged
merged 4 commits into from Aug 25, 2020

Commits on Jul 28, 2020

  1. fix: ensure supportsColor.level exists before stringifying it

    When supports-color detects a level of 0, it will not return an object containing the key `level`, but instead only `false`. This commit makes sure `supportsColor.level` exists before calling `supportsColor.level.toString()`.
    
    The TypeScript definitions of `chalk` seem wrong in this regard, since they imply that if `supportsColor` is truthy, it is an object and always contains the `level` key of type `0 | 1 | 2 | 3`.
    iiroj committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    aa9898e View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2020

  1. Configuration menu
    Copy the full SHA
    e0ee583 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7923ad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7a5182b View commit details
    Browse the repository at this point in the history