-
Notifications
You must be signed in to change notification settings - Fork 6.8k
MatTree can not be created in es6 #11580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I am facing this as well. Had the tree working under es5, but switched the target to es6 and started getting this error. |
Getting this as well. I upgraded to the latest 6.3.0 version but it still happens in there too. |
Same here. es6, es2017, and es2018 all do not work. This is a serious issue. @tinayuangao @josephperrott any thoughts? |
This can works in production mode |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Should work in es6
What is the current behavior?
Throw following error
ERROR TypeError: Cannot read property 'find' of undefined
at MatTree.ngOnInit (tree.js:484)
at checkAndUpdateDirectiveInline (core.js:11866)
at checkAndUpdateNodeInline (core.js:13394)
at checkAndUpdateNode (core.js:13337)
at debugCheckAndUpdateNode (core.js:14246)
at debugCheckDirectivesFn (core.js:14191)
at Object.eval [as updateDirectives] (TreeCheckListComponent.html:1)
at Object.debugUpdateDirectives [as updateDirectives] (core.js:14180)
at checkAndUpdateView (core.js:13303)
at callViewAction (core.js:13654)
What are the steps to reproduce?
use an example from angular/material
(https://material.angular.io/components/tree/examples)
and change the compiler target to "es6" in tsconfig.json
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
"dependencies": {
"@angular/animations": "^6.0.3",
"@angular/cdk": "^6.2.0",
"@angular/common": "^6.0.3",
"@angular/compiler": "^6.0.3",
"@angular/core": "^6.0.3",
"@angular/forms": "^6.0.3",
"@angular/http": "^6.0.3",
"@angular/material": "^6.2.0",
"@angular/platform-browser": "^6.0.3",
"@angular/platform-browser-dynamic": "^6.0.3",
"@angular/router": "^6.0.3",
"core-js": "^2.5.4",
"rxjs": "^6.0.0",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular/compiler-cli": "^6.0.3",
"@angular-devkit/build-angular": "~0.6.5",
"typescript": "~2.7.2",
"@angular/cli": "~6.0.5",
"@angular/language-service": "^6.0.3",
"@types/jasmine": "~2.8.6",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.2.1",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~1.7.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~1.4.2",
"karma-jasmine": "~1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.3.0",
"ts-node": "~5.0.1",
"tslint": "~5.9.1"
}
Is there anything else we should know?
the "_differs" constructor parameter of CdkTree is "undefined" at runtime
The text was updated successfully, but these errors were encountered: