jsGanttImproved / jsgantt-improved

Javascript Gantt: fully featured gantt chart component built entirely with JS and CSS. No images or external libs required.
https://jsganttimproved.github.io/jsgantt-improved
Other
480 stars 249 forks source link

zone.js:1061 Unhandled Promise rejection: Cannot read properties of null (reading 'clientHeight') ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read properties of null (reading 'clientHeight') #368

Closed ammad172 closed 1 year ago

ammad172 commented 1 year ago

We have recently Migrated angular 14 version and also updated some outdated libraries as well. And Currently we are facing this issue which is coming in browser console.

zone.js:1061 Unhandled Promise rejection: Cannot read properties of null (reading 'clientHeight') ; Zone: ; Task: Promise.then ; Value: TypeError: Cannot read properties of null (reading 'clientHeight')

My package.json looks like this

"dependencies": { "@angular/animations": "^14.2.4", "@angular/cdk": "^8.2.3", "@angular/common": "^14.2.4", "@angular/compiler": "^14.2.4", "@angular/core": "^14.2.4", "@angular/forms": "^14.2.4", "@angular/localize": "^14.2.4", "@angular/platform-browser": "^14.2.4", "@angular/platform-browser-dynamic": "^14.2.4", "@angular/platform-server": "^14.2.4", "@angular/router": "^14.2.4", "@ng-bootstrap/ng-bootstrap": "^13.0.0", "@ng-select/ng-select": "^9.0.2", "@popperjs/core": "^2.11.6", "@types/underscore": "^1.11.4", "angular-user-idle": "^3.0.0", "angular2-text-mask": "^9.0.0", "bootstrap": "^5.2.1", "cdk-drag-scroll": "^0.0.6", "chart.js": "^3.9.1", "core-js": "^3.25.5", "dompurify": "^2.4.0", "font-awesome": "^4.7.0", "g": "^2.0.1", "intl": "^1.2.5", "jquery": "^3.6.1", "mdn-polyfills": "^5.20.0", "moment": "^2.29.4", "ng-recaptcha": "^10.0.0", "ng2-file-upload": "^1.4.0", "ng2-pdf-viewer": "^9.1.2", "ng2-signalr": "^10.1.0", "ngx-color-picker": "^13.0.0", "ngx-image-cropper": "^6.2.2", "ngx-order-pipe": "^2.2.0", "ngx-pipes": "^3.1.0", "ngx-treeview": "^10.0.2", "ngx-virtual-scroller": "^4.0.3", "p": "^0.2.0", "rimraf": "^3.0.2", "rxjs": "^6.6.7", "signalr": "^2.4.3", "storage-emitter": "^2.0.1", "ts-node-dev": "^2.0.0", "underscore": "^1.13.6", "uuid": "^9.0.0", "webpack-dev-server": "^4.11.1", "zone.js": "^0.11.8" }, "devDependencies": { "@angular-devkit/build-angular": "^14.2.4", "@angular/cli": "^14.2.4", "@angular/compiler-cli": "^14.2.4", "@angular/language-service": "^14.2.4", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "^2.0.10", "@types/jquery": "^3.5.14", "@types/node": "^18.8.2", "@types/quill": "^2.0.9", "@typescript-eslint/eslint-plugin": "^5.38.1", "@typescript-eslint/parser": "^5.38.1", "ajv": "^8.11.0", "codelyzer": "^6.0.2", "eslint": "^8.24.0", "jasmine-core": "^4.4.0", "jasmine-spec-reporter": "^7.0.0", "karma": "^6.4.1", "karma-chrome-launcher": "^3.1.1", "karma-cli": "^2.0.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.0.0", "node-sass": "^7.0.3", "prettier": "^2.7.1", "protractor": "~7.0.0", "rxjs-tslint": "^0.1.8", "ts-node": "^10.9.1", "tslib": "^2.0.0", "typescript": "^4.8.4", "webpack": "^5.74.0" }

Has anyone face and solved this issue?

mariohmol commented 1 year ago

Hi, I looked over in this code where we have clientHeight, and I added an extra validation when using this var. It on v2.8.7