mirror of
https://github.com/littensy/charm.git
synced 2026-10-21 03:36:11 +00:00
docs: add check for payload type
This commit is contained in:
parent
cf44dd02ca
commit
955a757df5
1 changed files with 2 additions and 2 deletions
|
|
@ -420,8 +420,8 @@ import { sync } from "@rbxts/charm";
|
|||
const server = sync.server({ atoms: atomsToSync });
|
||||
|
||||
server.connect((player, payload) => {
|
||||
if (sync.isNone(payload.data.todosAtom?.eggs)) {
|
||||
// 'eggs' will be removed from the client's todo list
|
||||
if (payload.type === "patch" && sync.isNone(payload.data.todosAtom?.eggs)) {
|
||||
// 'eggs' will be removed from the client's todos atom
|
||||
}
|
||||
remotes.syncState.fire(player, payload);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue