question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StyleUtils._applyMultiValueStyleToElement Cannot read property 'setProperty' of undefined

See original GitHub issue

Bug Report

What is the expected behavior?

No errors

What is the current behavior?

I get the error ‘Cannot read property ‘setProperty’ of undefined’

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

10.0.4

the problematic code is https://github.com/angular/flex-layout/blob/9618c7bb5b423ed17e9e25f3a6315343a2660d1a/src/lib/core/style-utils/style-utils.ts#L124

it is trying to set style for an ng-reflect-* comment such as

<!--bindings={
  "ng-reflect-icon": "something"
}-->

I think it should check if element.style is defined. Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
CaerusKarucommented, Dec 24, 2021

ng-container is not a DOM element. This library only works with DOM elements (or components that get turned into DOM elements).

0reactions
angular-automatic-lock-bot[bot]commented, Jan 29, 2022

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'setProperty' of undefined fxFlex issue ...
Trying to use the [fxFlex]="50" inside the container getting an error Cannot read property 'setProperty' of undefined.
Read more >
getting can not read property of undefined? : r/angular - Reddit
Assuming getUserById is an asynchronous call like an http.get then ngOnInit executes setting up the subscription callback but does not wait for ...
Read more >
StyleUtils._applyMultiValueStyleToElement Cannot read ...
What is the expected behavior? No errors · What is the current behavior? I get the error 'Cannot read property 'setProperty' of undefined'...
Read more >
Cannot read property 'setProperty' of undefined fxFlex issue ...
Coding example for the question Cannot read property 'setProperty' of undefined fxFlex issue with ng-container Angular 9 Flex Layout-angular.js.
Read more >
Fix Cannot Set Property of Null Error in JavaScript - YouTube
Check us out at https://www.skillforge.com The " cannot set property of null" error is a very common JavaScript issue that you may come ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found