fix: send updates right after create
This commit is contained in:
parent
a3a0d666dc
commit
81f9c64bd0
|
@ -56,13 +56,13 @@ export default () => (Resource) => (
|
|||
const packets = [];
|
||||
for (let i = 0; i < this._synchronized.length; i++) {
|
||||
const synchronized = this._synchronized[i];
|
||||
if (-1 !== this._added.indexOf(synchronized)) {
|
||||
packets.push(synchronized.createPacket(informed));
|
||||
}
|
||||
else if (-1 !== this._removed.indexOf(synchronized)) {
|
||||
if (-1 !== this._removed.indexOf(synchronized)) {
|
||||
packets.push(synchronized.destroyPacket(informed));
|
||||
}
|
||||
else {
|
||||
if (-1 !== this._added.indexOf(synchronized)) {
|
||||
packets.push(synchronized.createPacket(informed));
|
||||
}
|
||||
const updatePacket = synchronized.updatePacket(informed);
|
||||
if (updatePacket) {
|
||||
packets.push(updatePacket);
|
||||
|
|
Loading…
Reference in New Issue
Block a user