1 parent 8cfcdb5 commit 4bcaa9bCopy full SHA for 4bcaa9b
1 file changed
src/lib/helpers/pageTitle.ts
@@ -9,10 +9,9 @@ import { BuildError } from '../errors/BuildError'
9
* @returns The formatted page title
10
*/
11
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
- })
+ if (typeof title !== 'string') {
+ throw new BuildError('Title passed to pageTitle formatter is not a string')
+ }
16
const seperator = ` | `
17
const casedPageTitle = titleCase(title)
18
const casedSiteTitle = titleCase(siteTitle)
0 commit comments