@hostlink/nuxt-light 1.26.9 → 1.26.11

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.26.9",
4
+ "version": "1.26.11",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -1,4 +1,18 @@
1
1
  import { default as api } from "./api.js";
2
+ const removeUndefinedValues = (obj) => {
3
+ for (const key in obj) {
4
+ if (obj[key] === void 0) {
5
+ delete obj[key];
6
+ }
7
+ if (typeof obj[key] === "object" && obj[key] !== null) {
8
+ removeUndefinedValues(obj[key]);
9
+ }
10
+ }
11
+ return obj;
12
+ };
2
13
  export default function(operation, args, fields = []) {
3
- return api.mutation(operation, args, fields);
14
+ if (args) {
15
+ args = removeUndefinedValues(args);
16
+ }
17
+ return api.mutation(operation, args ?? null, fields);
4
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.26.9",
3
+ "version": "1.26.11",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",