Merge branch 'master' into update-proxy-info
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
export const hasExtensionInstalled = () =>
|
||||
typeof window.__POSTWOMAN_EXTENSION_HOOK__ !== "undefined";
|
||||
typeof window.__POSTWOMAN_EXTENSION_HOOK__ !== "undefined"
|
||||
|
||||
const extensionWithProxy = async (req, { state }) => {
|
||||
const { data } = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest({
|
||||
@@ -12,15 +12,15 @@ const extensionWithProxy = async (req, { state }) => {
|
||||
};
|
||||
|
||||
const extensionWithoutProxy = async (req, _store) => {
|
||||
const res = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest(req);
|
||||
return res;
|
||||
};
|
||||
const res = await window.__POSTWOMAN_EXTENSION_HOOK__.sendRequest(req)
|
||||
return res
|
||||
}
|
||||
|
||||
const extensionStrategy = (req, store) => {
|
||||
if (store.state.postwoman.settings.PROXY_ENABLED) {
|
||||
return extensionWithProxy(req, store);
|
||||
return extensionWithProxy(req, store)
|
||||
}
|
||||
return extensionWithoutProxy(req, store);
|
||||
};
|
||||
return extensionWithoutProxy(req, store)
|
||||
}
|
||||
|
||||
export default extensionStrategy;
|
||||
export default extensionStrategy
|
||||
|
||||
Reference in New Issue
Block a user