Skip to content

Commit fd1ca36

Browse files
author
Alberto Iannaccone
committed
prevent baudrate from being reset
1 parent 5b01199 commit fd1ca36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function App() {
5151
? document.body.classList.add("dark")
5252
: document.body.classList.remove("dark");
5353
}
54-
setConfig({ ...config, ...message.data });
54+
setConfig((c) => ({ ...c, ...message.data }));
5555
}
5656
},
5757
// eslint-disable-next-line react-hooks/exhaustive-deps

0 commit comments

Comments
 (0)