@hostlink/nuxt-light 1.26.10 → 1.26.12

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