Skip to content

Conversation

@QuietlyChan
Copy link
Contributor

当输出样式未找到时使用默认样式并提示可用样式

@QuietlyChan
Copy link
Contributor Author

#465

assert(outputStyle, `Output style ${name} not found`);
if (!outputStyle) {
const availableStyles = this.outputStyles.map((style) => style.name);
console.warn(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.warn 在 ink 渲染模式下不太可靠,感觉还是得显式报错,但不是以 crash 的形式。我想想怎么 fix 。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我一开始是想显示报错的,提问的时候应该用助手回答的方式,不过写了好一会没写好,就用了这种简单一点的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants