mirror of
https://github.com/MichMich/MagicMirror.git
synced 2026-06-17 13:06:42 +00:00
9d315e1149
Follow-up to #4185. This PR replaces `.then()`/`.catch()` chains in the DOM update flow with `async/await`, making the code easier to read and reason about. **What changed:** - `createDomObjects` and `MM.updateDom` are now `async`, the nested `.then()` callbacks are gone - Extracted a small `createModuleDom()` helper to keep the loop in `createDomObjects` readable - Errors in `createDomObjects` are caught in a single `try/catch` - before, a failing module could cause an unhandled Promise rejection - `updateDomWithContent` now properly awaits the full show animation before resolving. The old code called `resolve()` while the animation was still running, which was technically wrong - Fixed `@param {Promise} callback` in JSDoc - it's not a Promise, it's a plain `() => void` function