Skip to content

Commit

Permalink
fixed possible NPE introduced with last bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
klues committed Apr 8, 2024
1 parent cd41c67 commit 0a5f8a2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/js/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,8 @@ function Grid(gridContainerId, gridItemClass, options) {
//only add global grid if not in edit mode
promises.push(
dataService.getGlobalGrid().then((globalGrid) => {
if (globalGrid.gridElements.length === 0) {
return Promise.resolve();
}
stateService.setGlobalGrid(globalGrid);
if (globalGrid) {
if (globalGrid && globalGrid.gridElements && globalGrid.gridElements.length > 0) {
let autowidth = true;
let heightPercentage = options.globalGridHeightPercentage
? options.globalGridHeightPercentage / 100
Expand Down

0 comments on commit 0a5f8a2

Please sign in to comment.