From 57a9babd40c6a0f8d013834e28483c94db9fbf55 Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Sun, 8 Dec 2024 00:58:53 -0500 Subject: [PATCH] chore: no need to use optional chaining twice --- frameworks/slickgrid-vue/src/components/SlickgridVue.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/slickgrid-vue/src/components/SlickgridVue.vue b/frameworks/slickgrid-vue/src/components/SlickgridVue.vue index e9158a1a5..20a9d5a3d 100644 --- a/frameworks/slickgrid-vue/src/components/SlickgridVue.vue +++ b/frameworks/slickgrid-vue/src/components/SlickgridVue.vue @@ -610,7 +610,7 @@ function disposing(shouldEmptyDomElementContainer = false) { eventPubSubService.publish('onBeforeGridDestroy', grid); eventHandler?.unsubscribeAll(); if (typeof i18next?.off === 'function') { - i18next?.off('languageChanged'); + i18next.off('languageChanged'); } // we could optionally also empty the content of the grid container DOM element @@ -732,7 +732,7 @@ function bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: // on locale change, we have to manually translate the Headers, GridMenu if (typeof i18next?.on === 'function') { - i18next?.on('languageChanged', (lang: string) => { + i18next.on('languageChanged', (lang: string) => { // publish event of the same name that Slickgrid-Universal uses on a language change event eventPubSubService.publish('onLanguageChange');