From 9cea1bc08cc93c8010b53d9aef900d64be75c14d Mon Sep 17 00:00:00 2001
From: FloatingGhost <hannah@coffee-and-dreams.uk>
Date: Thu, 1 Jul 2021 16:47:16 +0100
Subject: [PATCH] fix preset

---
 .eslintrc.js                                               | 3 ++-
 src/components/settings_modal/tabs/theme_tab/theme_tab.js  | 3 +++
 src/components/settings_modal/tabs/theme_tab/theme_tab.vue | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index 3c48baa8..12a8003a 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -21,6 +21,7 @@ module.exports = {
     'generator-star-spacing': 0,
     // allow debugger during development
     'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
-    'vue/require-prop-types': 0
+    'vue/require-prop-types': 0,
+    'vue/no-unused-vars': 0
   }
 }
diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.js b/src/components/settings_modal/tabs/theme_tab/theme_tab.js
index 1388f74b..8ddccdbc 100644
--- a/src/components/settings_modal/tabs/theme_tab/theme_tab.js
+++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.js
@@ -746,6 +746,9 @@ export default {
     },
     selected () {
       this.dismissWarning()
+      if (Object.prototype.toString.call(this.selected) === '[object String]') {
+        this.selected = JSON.parse(this.selected)
+      }
       if (this.selectedVersion === 1) {
         if (!this.keepRoundness) {
           this.clearRoundness()
diff --git a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue
index 548dc852..e86e1142 100644
--- a/src/components/settings_modal/tabs/theme_tab/theme_tab.vue
+++ b/src/components/settings_modal/tabs/theme_tab/theme_tab.vue
@@ -63,7 +63,7 @@
                 <option
                   v-for="style in availableStyles"
                   :key="style.name"
-                  :value="style"
+                  :value="JSON.stringify(style)"
                   :style="{
                     backgroundColor: style[1] || (style.theme || style.source).colors.bg,
                     color: style[3] || (style.theme || style.source).colors.text