JLynch7 / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://github.com/jlynch7/SlickGrid/wiki
MIT License
89 stars 76 forks source link

branch 2.0-frozenRowsAndColumns : this.data.length undefined #88

Open hafizchin opened 8 years ago

hafizchin commented 8 years ago

this.data in slick.grid.js function setFrozenOptions() can sometimes be null, so calling this.data.length will cause a javascript error.

probably you can update the code to avoid this scenario.

current : var dataLength = getDataLength() || this.data.length; proposed: var dataLength = getDataLength() || (this.data || []).length;

by the way, thank you for adding this feature in slickgrid :+1: