Add backward compatible support for onLayout event in Fabric

Reviewed By: achen1

Differential Revision: D8231722

fbshipit-source-id: 3d0641a7813e742ca81b98576f9ffc30ee597f30
This commit is contained in:
David Vacca
2018-06-01 17:47:40 -07:00
committed by Facebook Github Bot
parent 6c989fe7c6
commit 6aea98441a
8 changed files with 90 additions and 10 deletions
@@ -224,11 +224,11 @@ public class NativeViewHierarchyManager {
public long getInstanceHandle(int reactTag) {
View view = mTagsToViews.get(reactTag);
if (view == null) {
throw new IllegalArgumentException("Unable to find view for tag: " + reactTag);
throw new IllegalViewOperationException("Unable to find view for tag: " + reactTag);
}
Long instanceHandle = (Long) view.getTag(R.id.view_tag_instance_handle);
if (instanceHandle == null) {
throw new IllegalArgumentException("Unable to find instanceHandle for tag: " + reactTag);
throw new IllegalViewOperationException("Unable to find instanceHandle for tag: " + reactTag);
}
return instanceHandle;
}