Skip to content

Commit

Permalink
Fxi Toyp.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbiedermann committed Oct 18, 2019
1 parent ebecb16 commit 9d2321d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ruby/lib/lucid_app/native_component_constructor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def self.extended(base)
Opal.React.active_components.push(this);
Opal.React.active_redux_components.push(this.__ruby_instance);
let block_result;
if (base.preload_block && !this.state.preloaded && base.while_loding_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
if (base.preload_block && !this.state.preloaded && base.while_loading_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
else { block_result = #{`this.__ruby_instance`.instance_exec(&`base.render_block`)}; }
if (block_result && (block_result.constructor === String || block_result.constructor === Number)) { Opal.React.render_buffer[Opal.React.render_buffer.length - 1].push(block_result); }
Opal.React.active_redux_components.pop();
Expand All @@ -89,6 +89,8 @@ def self.extended(base)
return null;
}
}
base.preload_block = null;
base.while_loading_block = null;
base.jss_styles = null;
base.jss_theme = {};
base.use_styles = null;
Expand Down
2 changes: 1 addition & 1 deletion ruby/lib/lucid_component/native_component_constructor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def self.extended(base)
Opal.React.active_components.push(this);
Opal.React.active_redux_components.push(this);
let block_result;
if (base.preload_block && !this.state.preloaded && base.while_loding_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
if (base.preload_block && !this.state.preloaded && base.while_loading_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
else { block_result = #{`this.__ruby_instance`.instance_exec(&`base.render_block`)}; }
if (block_result && (block_result.constructor === String || block_result.constructor === Number)) { Opal.React.render_buffer[Opal.React.render_buffer.length - 1].push(block_result); }
Opal.React.active_redux_components.pop();
Expand Down
4 changes: 3 additions & 1 deletion ruby/lib/lucid_material/app/native_component_constructor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def self.extended(base)
Opal.React.active_components.push(this);
Opal.React.active_redux_components.push(this.__ruby_instance);
let block_result;
if (base.preload_block && !this.state.preloaded && base.while_loding_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
if (base.preload_block && !this.state.preloaded && base.while_loading_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
else { block_result = #{`this.__ruby_instance`.instance_exec(&`base.render_block`)}; }
if (block_result && (block_result.constructor === String || block_result.constructor === Number)) { Opal.React.render_buffer[Opal.React.render_buffer.length - 1].push(block_result); }
Opal.React.active_redux_components.pop();
Expand All @@ -90,6 +90,8 @@ def self.extended(base)
return null;
}
}
base.preload_block = null;
base.while_loading_block = null;
base.jss_styles = null;
base.jss_theme = Opal.global.Mui.createMuiTheme();
base.use_styles = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def self.extended(base)
Opal.React.active_components.push(this);
Opal.React.active_redux_components.push(this);
let block_result;
if (base.preload_block && !this.state.preloaded && base.while_loding_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
if (base.preload_block && !this.state.preloaded && base.while_loading_block) { block_result = #{`this.__ruby_instance`.instance_exec(&`base.while_loading_block`)}; }
else { block_result = #{`this.__ruby_instance`.instance_exec(&`base.render_block`)}; }
if (block_result && (block_result.constructor === String || block_result.constructor === Number)) { Opal.React.render_buffer[Opal.React.render_buffer.length - 1].push(block_result); }
Opal.React.active_redux_components.pop();
Expand Down Expand Up @@ -97,6 +97,8 @@ def self.extended(base)
return null;
}
};
base.preload_block = null;
base.while_loading_block = null;
base.jss_styles = null;
base.use_styles = null;
base.store_updates = true;
Expand Down

0 comments on commit 9d2321d

Please sign in to comment.