Skip to content

Commit 3961686

Browse files
authored
[Vue] Sonar: Use .includes(), rather than .indexOf(), when checking for existence (#31998)
1 parent d68c453 commit 3961686

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generators/vue/templates/src/main/webapp/app/core/jhi-navbar/jhi-navbar.component.ts.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export default defineComponent({
5959
const version = `v${APP_VERSION}`;
6060
const hasAnyAuthorityValues: Ref<any> = ref({});
6161

62-
const openAPIEnabled = computed(() => store.activeProfiles.indexOf('api-docs') > -1);
63-
const inProduction = computed(() => store.activeProfiles.indexOf('prod') > -1);
62+
const openAPIEnabled = computed(() => store.activeProfiles.includes('api-docs'));
63+
const inProduction = computed(() => store.activeProfiles.includes('prod'));
6464
const authenticated = computed(() => store.authenticated);
6565

6666
const subIsActive = (input: string | string[]) => {

0 commit comments

Comments
 (0)