🐛 Fixing save Collections/Environments on enabling sync

This commit is contained in:
Liyas Thomas
2020-05-12 15:37:32 +05:30
parent 2a9cc0eebf
commit da85a7ca87

View File

@@ -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() {