Skip to content

Commit a96dfcf

Browse files
committed
fix: make addModule function asynchronous to ensure state is saved before proceeding
1 parent 1bda80b commit a96dfcf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

frontend/src/lib/config/ModuleList.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
);
4747
};
4848
49-
const addModule = (target: Tag | Config | undefined, module: Module) => {
49+
const addModule = async (target: Tag | Config | undefined, module: Module) => {
5050
if (target && !target.modules.find((m) => m.type === module.type)) {
5151
target.modules = [...target.modules, { type: module.type, settings: {} }];
52-
saveState();
52+
await saveState();
5353
}
5454
addModuleModalOpen = false;
5555
goToModule(module);

0 commit comments

Comments
 (0)