lib/react/component/state.rb in isomorfeus-react-16.13.8 vs lib/react/component/state.rb in isomorfeus-react-16.13.9
- old
+ new
@@ -11,11 +11,13 @@
@native.JS.setState(new_state, `function() { block.$call(); }`)
else
@native.JS.setState(new_state, `null`)
end
else
- return nil if `typeof #@native.state[key] === "undefined"`
- @native.JS[:state].JS[key]
+ %x{
+ if (typeof #@native.state[key] === 'undefined') { return nil; }
+ return #@native.state[key];
+ }
end
end
def set_state(updater, &block)
new_state = `{}`