Update Authors

Co-Authored-By: Etorix <92535668+etorixdev@users.noreply.github.com>
This commit is contained in:
thororen1234 2026-02-01 17:37:06 -05:00
parent d0c16d1b14
commit 1b03f94e8a
No known key found for this signature in database

View file

@ -84,22 +84,18 @@ export default function PluginModal({ plugin, onRestartNeeded, onClose, transiti
useEffect(() => {
(async () => {
const loadedAuthors: Partial<User>[] = [];
for (const user of plugin.authors.slice(0, 6)) {
for (const [index, user] of plugin.authors.slice(0, 6).entries()) {
try {
const author = user.id
? await UserUtils.getUser(String(user.id))
.catch(() => makeDummyUser({ username: user.name }))
: makeDummyUser({ username: user.name });
loadedAuthors.push(author);
setAuthors(a => index === 0 ? [author] : [...a, author]);
} catch (e) {
continue;
}
}
setAuthors(loadedAuthors.length ? loadedAuthors : [dummyAuthor]);
})();
}, [plugin.authors]);