@@ -782,7 +782,7 @@ export class GridCompositeEditorComponent implements OnDestroy, OnInit {
782782 removeUnsavedStylingFromCell ( _item : any , column : Column , row : number ) {
783783 // remove unsaved css class from that cell
784784 const cssStyleKey = `unsaved_highlight_${ [ column . id ] } ${ row } ` ;
785- this . angularGrid . slickGrid . removeCellCssStyles ( cssStyleKey ) ;
785+ this . angularGrid . slickGrid ? .removeCellCssStyles ( cssStyleKey ) ;
786786 const foundIdx = this . cellCssStyleQueue . findIndex ( ( styleKey ) => styleKey === cssStyleKey ) ;
787787 if ( foundIdx >= 0 ) {
788788 this . cellCssStyleQueue . splice ( foundIdx , 1 ) ;
@@ -791,7 +791,7 @@ export class GridCompositeEditorComponent implements OnDestroy, OnInit {
791791
792792 removeAllUnsavedStylingFromCell ( ) {
793793 for ( const cssStyleKey of this . cellCssStyleQueue ) {
794- this . angularGrid . slickGrid . removeCellCssStyles ( cssStyleKey ) ;
794+ this . angularGrid . slickGrid ? .removeCellCssStyles ( cssStyleKey ) ;
795795 }
796796 this . cellCssStyleQueue = [ ] ;
797797 }
@@ -815,7 +815,7 @@ export class GridCompositeEditorComponent implements OnDestroy, OnInit {
815815 if ( row !== undefined && row >= 0 ) {
816816 const hash = { [ row ] : { [ column . id ] : 'unsaved-editable-field' } } ;
817817 const cssStyleKey = `unsaved_highlight_${ [ column . id ] } ${ row } ` ;
818- this . angularGrid . slickGrid . setCellCssStyles ( cssStyleKey , hash ) ;
818+ this . angularGrid . slickGrid ? .setCellCssStyles ( cssStyleKey , hash ) ;
819819 this . cellCssStyleQueue . push ( cssStyleKey ) ;
820820 }
821821 }
0 commit comments