Skip to content

Commit dce5920

Browse files
committed
cant use comments in Opal JS code I guess
1 parent 88a0e31 commit dce5920

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

ruby/hyper-component/lib/hyperstack/internal/component/react_wrapper.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,7 @@ class ReactWrapper
1919
@@component_classes = {}
2020

2121
def self.stateless?(ncc)
22-
%x{
23-
typeof #{ncc} === 'function' // can be various things
24-
&& !(
25-
#{ncc}.prototype // native arrows don't have prototypes
26-
&& #{ncc}.prototype.isReactComponent // special property
27-
)
28-
}
22+
`typeof #{ncc} === 'function' && !(#{ncc}.prototype && #{ncc}.prototype.isReactComponent)`
2923
end
3024

3125
def self.import_native_component(opal_class, native_class)

0 commit comments

Comments
 (0)