Skip to content

Commit

Permalink
ui/component: default data prop to local state for data transform (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy Bastardi authored and Julian Delerme committed Jul 19, 2019
1 parent 3f3ab64 commit fff1df2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/components/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,9 @@ export default class Component {
* render the template using the {Renderer} with the current state and template of the component
* @returns {string}
*/
render (data) {
render (data = this._state.get()) {
this.beforeRender();
data = this.transformData(data) || this.transformData(this._state.get());
data = this.transformData(data);

let html = '';
// Use either the custom render function or the internal renderer
Expand Down

0 comments on commit fff1df2

Please sign in to comment.