@inflector/optima-pg 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -640,7 +640,10 @@ var Table = class {
|
|
|
640
640
|
// ── Realtime ────────────────────────────────────────────────────────────────
|
|
641
641
|
Subscribe(callback) {
|
|
642
642
|
return this.listenFn(this.name, (payload) => {
|
|
643
|
-
|
|
643
|
+
const event = JSON.parse(payload);
|
|
644
|
+
if (event.new) event.new = this.deserializeRow(event.new);
|
|
645
|
+
if (event.old) event.old = this.deserializeRow(event.old);
|
|
646
|
+
callback(event);
|
|
644
647
|
});
|
|
645
648
|
}
|
|
646
649
|
};
|