Skip to content

Commit 1d14642

Browse files
committed
Also ignore null fields
1 parent c435934 commit 1d14642

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/vuex-orm-apollo.esm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7810,8 +7810,8 @@ var QueryBuilder = /** @class */ (function () {
78107810
var returnValue = {};
78117811
Object.keys(data).forEach(function (key) {
78127812
var value = data[key];
7813-
// Ignore IDs and connections
7814-
if (!relations.has(key) && key !== 'id') {
7813+
// Ignore IDs and connections and empty fields
7814+
if (!relations.has(key) && key !== 'id' && value !== null) {
78157815
returnValue[key] = value;
78167816
}
78177817
});

src/queryBuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ export default class QueryBuilder {
139139
Object.keys(data).forEach((key) => {
140140
const value = data[key];
141141

142-
// Ignore IDs and connections
143-
if (!relations.has(key) && key !== 'id') {
142+
// Ignore IDs and connections and empty fields
143+
if (!relations.has(key) && key !== 'id' && value !== null) {
144144
returnValue[key] = value;
145145
}
146146
});

0 commit comments

Comments
 (0)