# HG changeset patch # User drewp@bigasterisk.com # Date 2023-05-30 02:37:41 # Node ID dcfa69d53fd2da4cd771ad32953a3c874fea553a # Parent 9bdc25ed5df53b8df500982d508da891d055c177 don't apply empty patch diff --git a/light9/web/rdfdbclient.ts b/light9/web/rdfdbclient.ts --- a/light9/web/rdfdbclient.ts +++ b/light9/web/rdfdbclient.ts @@ -28,7 +28,14 @@ export class RdfDbClient { this.clearGraphOnNewConnection(); }); this.channel.serverMessage.subscribe((m) => { - parseJsonPatch(m.body, this.applyPatch.bind(this)); + log('got server json', m.body) + parseJsonPatch(m.body, (p: Patch) => { + log('patch from server:', p.dump()) + if (p.isEmpty()) { + return; + } + this.applyPatch(p); + }); }); }