2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

prefer const when not reasigned

This commit is contained in:
Joffrey JAFFEUX 2017-06-05 14:33:52 +02:00
parent 64336a8c75
commit f8e5cbd81a
2 changed files with 3 additions and 3 deletions

View file

@ -338,7 +338,7 @@ export default Ember.Component.extend({
},
onKeyUp(text, cp) {
var subtext = text.substring(0, cp);
const subtext = text.substring(0, cp);
return subtext.match(/(:(?!:).?[\w-]*:?(?!:)(?:t\d?)?:?) ?$/gm);
},
@ -377,7 +377,7 @@ export default Ember.Component.extend({
return resolve([translations[full]]);
}
let match = term.match(/^:?(.*?):t(\d)?$/);
const match = term.match(/^:?(.*?):t(\d)?$/);
if (match) {
let name = match[1];
let scale = match[2];