Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect dispatch fn calls -- global env slice #3452

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ export const copyGlobalEnvironment = ({ name, environmentUid: baseEnvUid }) => (
const uid = uuid();
ipcRenderer
.invoke('renderer:create-global-environment', { uid, name, variables: baseEnv.variables })
.then(() => {
dispatch(_copyGlobalEnvironment({ name, uid, variables: baseEnv.variables }))
})
.then(() => dispatch(_copyGlobalEnvironment({ name, uid, variables: baseEnv.variables })))
.then(resolve)
.catch(reject);
});
Expand All @@ -127,9 +125,7 @@ export const renameGlobalEnvironment = ({ name: newName, environmentUid }) => (d
environmentSchema
.validate(environment)
.then(() => ipcRenderer.invoke('renderer:rename-global-environment', { name: newName, environmentUid }))
.then(
dispatch(_renameGlobalEnvironment({ name: newName, environmentUid }))
)
.then(() => dispatch(_renameGlobalEnvironment({ name: newName, environmentUid })))
.then(resolve)
.catch(reject);
});
Expand All @@ -151,9 +147,7 @@ export const saveGlobalEnvironment = ({ variables, environmentUid }) => (dispatc
environmentUid,
variables
}))
.then(
dispatch(_saveGlobalEnvironment({ environmentUid, variables }))
)
.then(() => dispatch(_saveGlobalEnvironment({ environmentUid, variables })))
.then(resolve)
.catch((error) => {
reject(error);
Expand All @@ -165,9 +159,7 @@ export const selectGlobalEnvironment = ({ environmentUid }) => (dispatch, getSta
return new Promise((resolve, reject) => {
ipcRenderer
.invoke('renderer:select-global-environment', { environmentUid })
.then(
dispatch(_selectGlobalEnvironment({ environmentUid }))
)
.then(() => dispatch(_selectGlobalEnvironment({ environmentUid })))
.then(resolve)
.catch(reject);
});
Expand All @@ -177,9 +169,7 @@ export const deleteGlobalEnvironment = ({ environmentUid }) => (dispatch, getSta
return new Promise((resolve, reject) => {
ipcRenderer
.invoke('renderer:delete-global-environment', { environmentUid })
.then(
dispatch(_deleteGlobalEnvironment({ environmentUid }))
)
.then(() => dispatch(_deleteGlobalEnvironment({ environmentUid })))
.then(resolve)
.catch(reject);
});
Expand Down Expand Up @@ -228,9 +218,7 @@ export const globalEnvironmentsUpdateEvent = ({ globalEnvironmentVariables }) =>
environmentUid,
variables
}))
.then(
dispatch(_saveGlobalEnvironment({ environmentUid, variables }))
)
.then(() => dispatch(_saveGlobalEnvironment({ environmentUid, variables })))
.then(resolve)
.catch((error) => {
reject(error);
Expand Down