Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

:bug: Fixing save Collections/Environments on enabling sync

Liyas Thomasda85a7ca8715
diff --git a/pages/settings.vue b/pages/settings.vue
index 6feba75c6..5751b7c54 100644
--- a/pages/settings.vue
+++ b/pages/settings.vue
@@ -359,7 +359,7 @@ export default {
},
getActiveColor() {
// This strips extra spaces and # signs from the strings.
- const strip = str => str.replace(/#/g, "").replace(/ /g, "")
+ const strip = (str) => str.replace(/#/g, "").replace(/ /g, "")
return `#${strip(
window.getComputedStyle(document.documentElement).getPropertyValue("--ac-color")
).toUpperCase()}`
@@ -375,10 +375,10 @@ export default {
toggleSettings(name, value) {
fb.writeSettings(name, !value)
if (name === "syncCollections" && value) {
- syncCollections()
+ this.syncCollections()
}
if (name === "syncEnvironments" && value) {
- syncEnvironments()
+ this.syncEnvironments()
}
},
initSettings() {