Skip to content

Commit

Permalink
also avoided double reArguments usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Giammarchi committed Jan 10, 2019
1 parent fd247c8 commit 1c7012d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
7 changes: 3 additions & 4 deletions cjs/hyper/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ function render() {
// parse it once, if unknown, to map all interpolations
// as single DOM callbacks, relate such template
// to the current context, and render it after cleaning the context up
function upgrade() {
const args = reArguments.apply(null, arguments);
function upgrade(template) {
const type = OWNER_SVG_ELEMENT in this ? 'svg' : 'html';
const tagger = new Tagger(type);
bewitched.set(this, {tagger, template: args[0]});
bewitched.set(this, {tagger, template: template});
this.textContent = '';
this.appendChild(tagger.apply(null, args));
this.appendChild(tagger.apply(null, arguments));
}

Object.defineProperty(exports, '__esModule', {value: true}).default = render;
Loading

0 comments on commit 1c7012d

Please sign in to comment.