Fix null reference on isError check

Summary: Fixed new error which appeared in logview after last release. See task T91245438 for details.

Reviewed By: passy

Differential Revision: D28569848

fbshipit-source-id: a4b622d4387aa41ecc4db269e05c5315669df250
This commit is contained in:
Anton Nikolaev
2021-05-20 07:12:18 -07:00
committed by Facebook GitHub Bot
parent 0c854eaeb5
commit fe7bb7cedd

View File

@@ -26,7 +26,8 @@ declare global {
export function isError(obj: any): obj is Error { export function isError(obj: any): obj is Error {
return ( return (
obj instanceof Error || obj instanceof Error ||
(obj.name && (obj &&
obj.name &&
typeof obj.name === 'string' && typeof obj.name === 'string' &&
obj.message && obj.message &&
typeof obj.message === 'string' && typeof obj.message === 'string' &&