From 33de6f258a8f34a75ed4a6c425ce02e99f575f42 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Sun, 31 May 2015 12:34:58 -0700 Subject: [PATCH] Set constructor properly in createReactNativeComponentClass Without this, the displayName property wasn't found when looking at `.constructor` on a component instance. Fixes facebook/react-devtools#92. --- Libraries/ReactNative/createReactNativeComponentClass.js | 1 + 1 file changed, 1 insertion(+) diff --git a/Libraries/ReactNative/createReactNativeComponentClass.js b/Libraries/ReactNative/createReactNativeComponentClass.js index c821cfa758ffc1..65af58d5ea322a 100644 --- a/Libraries/ReactNative/createReactNativeComponentClass.js +++ b/Libraries/ReactNative/createReactNativeComponentClass.js @@ -36,6 +36,7 @@ var createReactNativeComponentClass = function( }; Constructor.displayName = viewConfig.uiViewClassName; Constructor.prototype = new ReactNativeBaseComponent(viewConfig); + Constructor.prototype.constructor = Constructor; return Constructor; };