thinky icon indicating copy to clipboard operation
thinky copied to clipboard

Is there a way to return null instead of catching an Errors.DocumentNotFound?

Open lelandcope opened this issue 10 years ago • 1 comments

I have a use case where I want to query for a document and depending on if it exists I want to do different things. I can catch the DocumentNotFound but when using something like Promise.All I don't get access to the other items in the Promise.all that I need to complete the use case. Returning null instead of having to catch the error would work perfectly. Id this possible to do?

lelandcope avatar Dec 16 '15 23:12 lelandcope

You can use _get instead of get. Looks like I forgot to write doc about that.

neumino avatar Dec 17 '15 07:12 neumino