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:
parent
64336a8c75
commit
f8e5cbd81a
2 changed files with 3 additions and 3 deletions
|
@ -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];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue