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:
committed by
Facebook GitHub Bot
parent
0c854eaeb5
commit
fe7bb7cedd
@@ -26,7 +26,8 @@ declare global {
|
||||
export function isError(obj: any): obj is Error {
|
||||
return (
|
||||
obj instanceof Error ||
|
||||
(obj.name &&
|
||||
(obj &&
|
||||
obj.name &&
|
||||
typeof obj.name === 'string' &&
|
||||
obj.message &&
|
||||
typeof obj.message === 'string' &&
|
||||
|
||||
Reference in New Issue
Block a user