Skip to content

Commit 4bcaa9b

Browse files
committed
Fix bad error call in pagetitle helper test
1 parent 8cfcdb5 commit 4bcaa9b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎src/lib/helpers/pageTitle.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ import { BuildError } from '../errors/BuildError'
99
* @returns The formatted page title
1010
*/
1111
export const pageTitle = (title: string, siteTitle: string) => {
12-
if (typeof title !== 'string')
13-
throw new BuildError({
14-
message: `Title passed to pageTitle formatter is not a string, received:\n${title}`
15-
})
12+
if (typeof title !== 'string') {
13+
throw new BuildError('Title passed to pageTitle formatter is not a string')
14+
}
1615
const seperator = ` | `
1716
const casedPageTitle = titleCase(title)
1817
const casedSiteTitle = titleCase(siteTitle)

0 commit comments

Comments
 (0)