Improve strategy code redability

This commit is contained in:
Andrew Bastin
2020-01-18 04:16:51 -05:00
parent 951266e529
commit 730018b45f
2 changed files with 4 additions and 2 deletions

View File

@@ -15,8 +15,9 @@ const axiosWithoutProxy = async (req, _store) => {
};
const axiosStrategy = (req, store) => {
if (store.state.postwoman.settings.PROXY_ENABLED)
if (store.state.postwoman.settings.PROXY_ENABLED) {
return axiosWithProxy(req, store);
}
else return axiosWithoutProxy(req, store);
}

View File

@@ -30,8 +30,9 @@ const firefoxWithoutProxy = (req, _store) => new Promise((resolve, reject) => {
});
const firefoxStrategy = (req, store) => {
if (store.state.postwoman.settings.PROXY_ENABLED)
if (store.state.postwoman.settings.PROXY_ENABLED) {
return firefoxWithProxy(req, store);
}
else return firefoxWithoutProxy(req, store);
}