Convert more

This commit is contained in:
Leonabcd123 2026-01-09 14:45:45 +02:00
parent 3b9e119044
commit 8b0b3d936c

View file

@ -89,12 +89,15 @@ const actionModals: Record<Action, SimpleModal> = {
};
}
DB.getSnapshot()?.tags?.forEach((tag) => {
if (tag._id === tagId) {
tag.name = tagName;
tag.display = propTagName;
}
});
const matchingTag = DB.getSnapshot()?.tags.find(
(tag) => tag._id === tagId,
);
if (matchingTag !== undefined) {
matchingTag.name = tagName;
matchingTag.display = propTagName;
}
void Settings.update();
return { status: 1, message: `Tag updated` };