Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit 57821ae

Browse files
committed
added check for legacy react native components
1 parent bffd433 commit 57821ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/react/api.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def self.import_native_component(opal_class, native_class)
2222
def self.eval_native_react_component(name)
2323
component = `eval(name)`
2424
raise "#{name} is not defined" if `#{component} === undefined`
25-
unless `#{component}.prototype !== undefined && !!#{component}.prototype.isReactComponent`
25+
unless `#{component}.prototype !== undefined` &&
26+
(`!!#{component}.prototype.isReactComponent` || `!!#{component}.prototype.render`)
2627
raise 'does not appear to be a native react component'
2728
end
2829
component

0 commit comments

Comments
 (0)