Skip to content

Commit

Permalink
chore: no need to use optional chaining twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 8, 2024
1 parent 9a225c9 commit 57a9bab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frameworks/slickgrid-vue/src/components/SlickgridVue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 57a9bab

Please sign in to comment.