Skip to content

Commit

Permalink
Refreshing
Browse files Browse the repository at this point in the history
  • Loading branch information
brainkim committed Oct 12, 2020
1 parent d89c229 commit cfd60c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crank.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,15 @@ class Context {
this._el = el;
this._iter = undefined;
}

refresh() {
return updateCtx(this);
}
}

function updateCtx(ctx) {
if (!ctx._iter) {
const value = ctx._el.tag(ctx._el.props);
const value = ctx._el.tag.call(ctx, ctx._el.props);
if (isIteratorLike(value)) {
ctx._iter = value;
} else {
Expand Down

0 comments on commit cfd60c8

Please # to comment.