Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jun 14, 2023
1 parent e0e2a44 commit 699649d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vite-plugin-ssr/utils/assert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function assert(condition: unknown, debugInfo?: unknown): asserts condition {
function assertUsage(condition: unknown, errMsg: string): asserts condition {
if (condition) return
globalObject.hasLogged = true
errMsg = addPrefix('Wrong usage', errMsg)
errMsg = addPrefix('Wrong Usage', errMsg)
const usageError = createErrorWithCleanStackTrace(errMsg, numberOfStackTraceLinesToRemove)
globalObject.onBeforeLog?.()
throw usageError
Expand Down Expand Up @@ -130,7 +130,7 @@ function assertHasLogged(): boolean {
return !!globalObject.hasLogged
}

type Tag = 'Bug' | 'Wrong usage' | 'Error' | 'Warning' | 'Info'
type Tag = 'Bug' | 'Wrong Usage' | 'Error' | 'Warning' | 'Info'
function addPrefix(tag: Tag, msg: string) {
let prefix = `[${tag}]`
const color = tag === 'Info' ? 'blue' : tag === 'Warning' ? 'yellow' : 'red'
Expand Down

0 comments on commit 699649d

Please sign in to comment.