chore: Use CameraRuntimeError
if device
is null
This commit is contained in:
parent
5ab7b291db
commit
83b852acd0
@ -464,7 +464,8 @@ export class Camera extends React.PureComponent<CameraProps, CameraState> {
|
|||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
||||||
if (device == null) {
|
if (device == null) {
|
||||||
throw new Error(
|
throw new CameraRuntimeError(
|
||||||
|
'device/no-device',
|
||||||
'Camera: `device` is null! Select a valid Camera device. See: https://mrousavy.com/react-native-vision-camera/docs/guides/devices',
|
'Camera: `device` is null! Select a valid Camera device. See: https://mrousavy.com/react-native-vision-camera/docs/guides/devices',
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user