Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sources.forEach((proxy) => {
commit(Mutations.PROXY_SOURCE_TO_REPRESENTATION_SET, proxy);
// Fetch proxy data if not available
if (!state.proxyDataMap[proxy.id]) {
dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.id });
}
// Fetch proxy name if not available
if (!state.proxyNames[proxy.id]) {
dispatch(Actions.PROXY_NAME_FETCH, proxy.id);
}
// Fetch representation data if not available
if (!state.proxyDataMap[proxy.rep]) {
dispatch(Actions.PROXY_DATA_FETCH, { proxyId: proxy.rep });
}
// Fetch representation name if not available
if (!state.proxyNames[proxy.rep]) {
dispatch(Actions.PROXY_NAME_FETCH, proxy.rep);
}
});
.then((readerProxy) => {
this.$store.dispatch(Actions.PROXY_NAME_FETCH, readerProxy.id);
this.$store.dispatch(Actions.PROXY_PIPELINE_FETCH);
this.$store.dispatch(Actions.MODULES_ACTIVE_CLEAR);
this.$store.commit(Mutations.PROXY_SELECTED_IDS_SET, [
readerProxy.id,
]);
})
.catch(console.error);