mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Eslint prefer-const (#17864)
* adds prefer-const to eslint config and runs fixer * reverts unintended change
This commit is contained in:
@@ -55,7 +55,7 @@ export default Component.extend(FocusOnInsertMixin, {
|
||||
firstPartialMatch: null,
|
||||
|
||||
transitionToRoute(...args) {
|
||||
let params = args.map((param, index) => {
|
||||
const params = args.map((param, index) => {
|
||||
if (index === 0 || typeof param !== 'string') {
|
||||
return param;
|
||||
}
|
||||
@@ -80,19 +80,19 @@ export default Component.extend(FocusOnInsertMixin, {
|
||||
return `cert/${key}`;
|
||||
},
|
||||
onEnter: function (val) {
|
||||
let { baseKey, mode } = this;
|
||||
let extraParams = this.extraNavParams;
|
||||
const { baseKey, mode } = this;
|
||||
const extraParams = this.extraNavParams;
|
||||
if (mode.startsWith('secrets') && (!val || val === baseKey)) {
|
||||
return;
|
||||
}
|
||||
if (this.filterMatchesKey && !utils.keyIsFolder(val)) {
|
||||
let params = [routeFor('show', mode, this.urls), extraParams, this.keyForNav(val)].compact();
|
||||
const params = [routeFor('show', mode, this.urls), extraParams, this.keyForNav(val)].compact();
|
||||
this.transitionToRoute(...params);
|
||||
} else {
|
||||
if (mode === 'policies') {
|
||||
return;
|
||||
}
|
||||
let route = routeFor('create', mode, this.urls);
|
||||
const route = routeFor('create', mode, this.urls);
|
||||
if (baseKey) {
|
||||
this.transitionToRoute(route, this.keyForNav(baseKey), {
|
||||
queryParams: {
|
||||
@@ -154,7 +154,7 @@ export default Component.extend(FocusOnInsertMixin, {
|
||||
|
||||
navigate(key, mode, pageFilter) {
|
||||
const route = routeFor(key ? 'list' : 'list-root', mode, this.urls);
|
||||
let args = [route];
|
||||
const args = [route];
|
||||
if (key) {
|
||||
args.push(key);
|
||||
}
|
||||
@@ -204,7 +204,7 @@ export default Component.extend(FocusOnInsertMixin, {
|
||||
|
||||
handleKeyUp: function (event) {
|
||||
var keyCode = event.keyCode;
|
||||
let val = event.target.value;
|
||||
const val = event.target.value;
|
||||
if (keyCode === keys.ENTER) {
|
||||
this.onEnter(val);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user