diff --git a/src/reporters/fancy.ts b/src/reporters/fancy.ts index 433b131..4ab5d43 100644 --- a/src/reporters/fancy.ts +++ b/src/reporters/fancy.ts @@ -39,7 +39,8 @@ const TYPE_ICONS: { [k in LogType]?: string } = { function stringWidth(str: string) { // https://github.com/unjs/consola/issues/204 - if (!Intl.Segmenter) { + const hasICU = typeof Intl === "object"; + if (!hasICU || !Intl.Segmenter) { return stripAnsi(str).length; } return _stringWidth(str);