handle the case where getResourceName failed
handle the case where getResourceName failed

Summary: When getResourceName failed, the struct `name` here will be empty and we should handle it.

Reviewed By: inreverse-sec

Differential Revision: D31996215

fbshipit-source-id: cd968f007e5587fd6f6a3835d6fb197ebc69e4be

facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex,facebook/redex