Fix reading list rendering multiple times (#9364)
This commit is contained in:
parent
73a3bcc68a
commit
6853e103ae
1 changed files with 3 additions and 2 deletions
|
|
@ -4,7 +4,9 @@ import { ReadingList } from '../readingList/readingList';
|
|||
|
||||
function loadElement() {
|
||||
getUserDataAndCsrfToken().then(({ currentUser }) => {
|
||||
const followedTagNames = JSON.parse(currentUser.followed_tags).map(t => t.name);
|
||||
const followedTagNames = JSON.parse(currentUser.followed_tags).map(
|
||||
(t) => t.name,
|
||||
);
|
||||
const root = document.getElementById('reading-list');
|
||||
if (root) {
|
||||
render(
|
||||
|
|
@ -13,7 +15,6 @@ function loadElement() {
|
|||
statusView={root.dataset.view}
|
||||
/>,
|
||||
root,
|
||||
root.firstElementChild,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue