Skip to content

Commit

Permalink
fix: remove wrong assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
lourot committed Nov 20, 2023
1 parent d4b66de commit f91537e
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions vike/shared/assertDataHookReturn.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export { assertDataHookReturn }

import { assertUsage, isPlainObject } from './utils.js'
import { assertHookReturnedObject } from './assertHookReturnedObject.js'
import pc from '@brillout/picocolors'

function assertDataHookReturn<Keys extends readonly string[]>(
Expand All @@ -16,5 +15,4 @@ function assertDataHookReturn<Keys extends readonly string[]>(
isPlainObject(hookReturnValue),
`${errPrefix} should return a plain JavaScript object, ${pc.cyan('undefined')}, or ${pc.cyan('null')}`
)
assertHookReturnedObject(hookReturnValue, [] as const, errPrefix)
}

0 comments on commit f91537e

Please sign in to comment.