Skip to content

Commit

Permalink
Sorting info tiles (fix)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonym-tsk committed Jan 4, 2024
1 parent 6271a96 commit 883a517
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions dist/starline-card.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/ts/StarlineCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@ export class StarlineCard extends HTMLElement {
// TODO: Переделать, чтобы в _setInfoState не нужно было проверять видимость (а лучше вообще лишние элементы удалить)
const $cnt = this._info.balance.element!.parentNode!;
for (const name of this._config.info) {
const $item = $cnt.querySelector(`.info-${name}`)!;
$cnt.appendChild($item);
const $item = this._info[name]?.element;
if ($item) {
$cnt.appendChild($item);
}
}
}

Expand Down

0 comments on commit 883a517

Please sign in to comment.