mikolalysenko / mudb

Low latency state replication for the web

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove action bug in MuRDAMap

LittleMorakot opened this issue · comments

After dispatch a remove action in MuRDAMap, if using replica.state(stateA) in change listener, the state in replica is not correctly copied into stateA

this.replica.configure({
    change: (newState) => {
        this.replica.state(this.state);
        // this.state is old state, but newState is correct
    },
});

Probably the issue is murdamap's store is broken. It should be removing states from the old state, but it's not.