appuniversum / ember-appuniversum

Ember addon wrapping the appuniversum components.
https://appuniversum.github.io/ember-appuniversum
MIT License
14 stars 11 forks source link

The `AuMainHeader` component expects an element with id `main` to be present. #376

Closed elpoelma closed 1 year ago

elpoelma commented 1 year ago

Description The AuMainHeader component expects an element with id main to be present (such as an AuMainContainer). It's possible that this is not always the case. If an element with id main is not present, the component throws an error.

Windvis commented 1 year ago

Oh, right. I think we can simply tweak this logic: https://github.com/appuniversum/ember-appuniversum/blob/664ad812ecd16244dcfa2765476878a2566e62e4/addon/components/au-main-header.js#L8

And only do the focussing if the element actually exists.

I initially had this idea for a more flexible solution but thought it was not worth the effort (but forgot to fix this issue 😬): https://github.com/appuniversum/ember-appuniversum/issues/195