Skip to content

Commit

Permalink
Avoid undefined check for regular cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Sep 25, 2021
1 parent 7bb0f70 commit b1d82b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -17,7 +17,7 @@ export const isColorSupported =
!isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI)

const raw = (open, close, searchRegex, replaceValue) => (s) =>
s === undefined || s === ""
!s && (s === "" || s === undefined)
? ""
: open +
(~(s + "").indexOf(close, 4) // skip opening \x1b[
Expand Down

0 comments on commit b1d82b9

Please sign in to comment.