Skip to content

Commit

Permalink
Avoid string concatentation to template strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadKillingsworth committed Jan 30, 2019
1 parent f5c95f6 commit 0e6daa7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/elements/array-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,13 @@
let sidx = 0;
this.__selectedMap.forEach(idx => {
if (idx >= 0) {
this.linkPaths(`${JSCompiler_renameProperty('items', this)}.` + idx, `${JSCompiler_renameProperty('selected', this)}.` + sidx++);
this.linkPaths(`${JSCompiler_renameProperty('items', this)}.${idx}`, `${JSCompiler_renameProperty('selected', this)}.${sidx++}`);
}
});
} else {
this.__selectedMap.forEach(idx => {
this.linkPaths(JSCompiler_renameProperty('selected', this), `${JSCompiler_renameProperty('items', this)}.` + idx);
this.linkPaths(JSCompiler_renameProperty('selectedItem', this), `${JSCompiler_renameProperty('items', this)}.` + idx);
this.linkPaths(JSCompiler_renameProperty('selected', this), `${JSCompiler_renameProperty('items', this)}.${idx}`);
this.linkPaths(JSCompiler_renameProperty('selectedItem', this), `${JSCompiler_renameProperty('items', this)}.${idx}`);
});
}
}
Expand Down Expand Up @@ -260,7 +260,7 @@
}

__selectedIndexForItemIndex(idx) {
let selected = this.__dataLinkedPaths[`${JSCompiler_renameProperty('items', this)}.` + idx];
let selected = this.__dataLinkedPaths[`${JSCompiler_renameProperty('items', this)}.${idx}`];
if (selected) {
return parseInt(selected.slice(`${JSCompiler_renameProperty('selected', this)}.`.length), 10);
}
Expand Down

0 comments on commit 0e6daa7

Please sign in to comment.