Skip to content

Commit

Permalink
fix: console log override first arg can be a non-string
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 3, 2022
1 parent e007022 commit 2126965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/histoire/src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const file = { id: '${story.id}', file: '${story.file}', component: Comp,
// Hide spammy vite messages
const origConsoleLog = console.log
console.log = (...args) => {
if (!args[0].startsWith('[vite] connect')) {
if (typeof args[0] !== 'string' || !args[0].startsWith('[vite] connect')) {
origConsoleLog(...args)
}
}
Expand Down

0 comments on commit 2126965

Please sign in to comment.