I use lightning:avatar
component in my employee card. And found one error when try filtering list of employees.
After filtering my list of employees i set final list in component atribute which using in aura:iteration
. When Aura try rerendering my employee card in component.set
occur aura exception in lightning:avatar
component:
`src` attribute for lightning:avatar has to have a non-empty value.
But all sections with avatar component not rendering if i not have path to photo.
I resolved this problem using expression in src atribute {! v.pathToPhoto ? v.pathToPhoto : 'foo' }
. But this way isn't true :(
How to fix this error another way?
P.S. I don't write here code snippets because this components very big.