Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jgermade committed Sep 6, 2018
1 parent f877e3b commit d2b1791
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions render.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ RenderApp.prototype.component = function (tag_name, options, render_options) {
if( node.$ !== tag_name ) return;

var with_node = options.withNode && options.withNode.apply(render_app, arguments) || {},
_initNode = with_node.withNode;
_initNode = with_node.initNode;

return _.extend( with_node, {
initNode: options.controller && options.template ? function (node_el) {
Expand All @@ -135,13 +135,13 @@ RenderApp.prototype.component = function (tag_name, options, render_options) {
options.controller.apply(_this, _args);

if( _initNode instanceof Function ) _initNode.apply(this, arguments);

} : ( options.controller || function (node_el) {
} : function (node_el) {
if( typeof options.template === 'string' ) node_el.innerHTML = options.template;
else if( options.template ) render_app.render(node_el, options.template, render_options);

if( _initNode instanceof Function ) _initNode.apply(this, arguments);
}),
if( options.controller instanceof Function ) options.controller.apply(this, arguments);
},
});

});
Expand Down

0 comments on commit d2b1791

Please sign in to comment.