1

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.

2
  • Please post your component code so we can see the problem Commented Apr 19, 2017 at 5:18
  • My component is big and this problem needs to show deeply...
    – TPEHEP
    Commented Apr 20, 2017 at 13:13

0

You must log in to answer this question.

Browse other questions tagged .