From e295c26b99a59664219fd457215308f305933d6a Mon Sep 17 00:00:00 2001 From: Ghislain Beaulac Date: Thu, 21 Nov 2019 13:23:34 -0500 Subject: [PATCH] fix(picker): make sure picker addon is available before translating --- .../angular-slickgrid/extensions/columnPickerExtension.ts | 4 +++- .../modules/angular-slickgrid/extensions/gridMenuExtension.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/modules/angular-slickgrid/extensions/columnPickerExtension.ts b/src/app/modules/angular-slickgrid/extensions/columnPickerExtension.ts index 41af707ab..b516dea7f 100644 --- a/src/app/modules/angular-slickgrid/extensions/columnPickerExtension.ts +++ b/src/app/modules/angular-slickgrid/extensions/columnPickerExtension.ts @@ -81,7 +81,9 @@ export class ColumnPickerExtension implements Extension { this.extensionUtility.translateItems(this.sharedService.allColumns, 'headerKey', 'name'); // update the Titles of each sections (command, customTitle, ...) - this._addon.updateAllTitles(this.sharedService.gridOptions.columnPicker); + if (this._addon && this._addon.updateAllTitles) { + this._addon.updateAllTitles(this.sharedService.gridOptions.columnPicker); + } } } diff --git a/src/app/modules/angular-slickgrid/extensions/gridMenuExtension.ts b/src/app/modules/angular-slickgrid/extensions/gridMenuExtension.ts index d605c19d6..f9c09cd3a 100644 --- a/src/app/modules/angular-slickgrid/extensions/gridMenuExtension.ts +++ b/src/app/modules/angular-slickgrid/extensions/gridMenuExtension.ts @@ -175,7 +175,9 @@ export class GridMenuExtension implements Extension { this.extensionUtility.translateItems(this.sharedService.allColumns, 'headerKey', 'name'); // update the Titles of each sections (command, customTitle, ...) - this._addon.updateAllTitles(this.sharedService.gridOptions.gridMenu); + if (this._addon && this._addon.updateAllTitles) { + this._addon.updateAllTitles(this.sharedService.gridOptions.gridMenu); + } } }