From 151f5e355d3d75806a9822b015c1c895b8a6fa5f Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 1 Jun 2023 07:55:59 +0900 Subject: [PATCH 1/2] Fix exported settings being not importable --- packages/client/src/pages/settings/preferences-backups.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/pages/settings/preferences-backups.vue b/packages/client/src/pages/settings/preferences-backups.vue index a5f606e0ef..595fe4f03c 100644 --- a/packages/client/src/pages/settings/preferences-backups.vue +++ b/packages/client/src/pages/settings/preferences-backups.vue @@ -173,7 +173,7 @@ function validate(profile: unknown): void { if (!isObject(profile)) throw new Error("not an object"); // Check if unnecessary properties exist - if (Object.keys(profile).some((key) => !profileProps.includes(key))) + if (Object.keys(profile).some((key) => !profileProps.includes(key) && key !== "host")) throw new Error("Unnecessary properties exist"); if (!profile.name) throw new Error("Missing required prop: name"); From 7b02b87ec67c0bd5145078fcade5589577d0b45f Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 1 Jun 2023 08:01:24 +0900 Subject: [PATCH 2/2] format --- packages/client/src/pages/settings/preferences-backups.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/client/src/pages/settings/preferences-backups.vue b/packages/client/src/pages/settings/preferences-backups.vue index 595fe4f03c..14bb27f91e 100644 --- a/packages/client/src/pages/settings/preferences-backups.vue +++ b/packages/client/src/pages/settings/preferences-backups.vue @@ -173,7 +173,11 @@ function validate(profile: unknown): void { if (!isObject(profile)) throw new Error("not an object"); // Check if unnecessary properties exist - if (Object.keys(profile).some((key) => !profileProps.includes(key) && key !== "host")) + if ( + Object.keys(profile).some( + (key) => !profileProps.includes(key) && key !== "host" + ) + ) throw new Error("Unnecessary properties exist"); if (!profile.name) throw new Error("Missing required prop: name");