This repository was archived by the owner on Oct 19, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ def self.eval_native_react_component(name)
3434 component
3535 end
3636
37- def self . native_react_component? ( name )
37+ def self . native_react_component? ( name = nil )
38+ return false unless name
3839 eval_native_react_component ( name )
3940 rescue
4041 nil
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class NestedComponent < React::Component::Base
6969 expect ( React ::API . native_react_component? ( `window.NativeComponent` ) ) . to be_truthy
7070 expect ( React ::API . native_react_component? ( `{render: function render() {}}` ) ) . to be_falsy
7171 expect ( React ::API . native_react_component? ( `window.DoesntExist` ) ) . to be_falsy
72- expect ( React ::API . native_react_component? ( `` ) ) . to be_falsy
72+ expect ( React ::API . native_react_component? ( ) ) . to be_falsy
7373 end
7474
7575 it "will import a React.js library into the Ruby name space" do
You can’t perform that action at this time.
0 commit comments