There was an error while loading. Please reload this page.
1 parent 3488a7f commit d590bd2Copy full SHA for d590bd2
1 file changed
src/LiveQuery/Client.js
@@ -137,11 +137,8 @@ class Client {
137
requestId: subscriptionId,
138
};
139
140
- if (results && Array.isArray(results)) {
141
- let keys;
142
- if (this.subscriptionInfos.has(subscriptionId)) {
143
- keys = this.subscriptionInfos.get(subscriptionId).keys;
144
- }
+ if (Array.isArray(results)) {
+ const keys = this.subscriptionInfos.get(subscriptionId)?.keys;
145
response['results'] = results.map(obj => this._toJSONWithFields(obj, keys));
146
} else {
147
response['results'] = [];
0 commit comments