Skip to content

Commit 0e6daa7

Browse files
Avoid string concatentation to template strings
1 parent f5c95f6 commit 0e6daa7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/elements/array-selector.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,13 @@
199199
let sidx = 0;
200200
this.__selectedMap.forEach(idx => {
201201
if (idx >= 0) {
202-
this.linkPaths(`${JSCompiler_renameProperty('items', this)}.` + idx, `${JSCompiler_renameProperty('selected', this)}.` + sidx++);
202+
this.linkPaths(`${JSCompiler_renameProperty('items', this)}.${idx}`, `${JSCompiler_renameProperty('selected', this)}.${sidx++}`);
203203
}
204204
});
205205
} else {
206206
this.__selectedMap.forEach(idx => {
207-
this.linkPaths(JSCompiler_renameProperty('selected', this), `${JSCompiler_renameProperty('items', this)}.` + idx);
208-
this.linkPaths(JSCompiler_renameProperty('selectedItem', this), `${JSCompiler_renameProperty('items', this)}.` + idx);
207+
this.linkPaths(JSCompiler_renameProperty('selected', this), `${JSCompiler_renameProperty('items', this)}.${idx}`);
208+
this.linkPaths(JSCompiler_renameProperty('selectedItem', this), `${JSCompiler_renameProperty('items', this)}.${idx}`);
209209
});
210210
}
211211
}
@@ -260,7 +260,7 @@
260260
}
261261

262262
__selectedIndexForItemIndex(idx) {
263-
let selected = this.__dataLinkedPaths[`${JSCompiler_renameProperty('items', this)}.` + idx];
263+
let selected = this.__dataLinkedPaths[`${JSCompiler_renameProperty('items', this)}.${idx}`];
264264
if (selected) {
265265
return parseInt(selected.slice(`${JSCompiler_renameProperty('selected', this)}.`.length), 10);
266266
}

0 commit comments

Comments
 (0)