Skip to content

Commit d39a2d7

Browse files
authored
fix: don't throw when passing a Seam client to <SeamProvider/>
2 parents 52d443d + d03d3a6 commit d39a2d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/seam/SeamProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ const isSeamProviderPropsWithClient = (
203203
): props is SeamProviderPropsWithClient => {
204204
if (!('client' in props)) return false
205205

206-
const { client } = props
206+
const { client, ...otherProps } = props
207207
if (client == null) return false
208208

209-
const otherNonNullProps = Object.values(props).filter((v) => v != null)
209+
const otherNonNullProps = Object.values(otherProps).filter((v) => v != null)
210210
if (otherNonNullProps.length > 0) {
211211
throw new InvalidSeamProviderProps(
212212
`The client prop cannot be used with ${otherNonNullProps.join(' or ')}.`

0 commit comments

Comments
 (0)