Skip to content

Commit

Permalink
remove dulplicate startCommand in setting.runtime (#3876)
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyLaw authored Aug 21, 2020
1 parent e6ff329 commit d476007
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Composer/packages/client/src/recoilModel/selectors/eject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ const ejectRuntimeAction = (dispatcher: Dispatcher) => {
if (!lodashGet(response, 'data.settings.path', '') || !lodashGet(response, 'data.settings.startCommand', '')) {
throw new Error('Runtime cannot be ejected');
}
dispatcher.setRuntimeSettings(projectId, {
...response.data.settings,
command: response.data.settings.startCommand,
});
const runtimeSetting = response.data.settings;
runtimeSetting.command = response.data.settings.startCommand;
delete runtimeSetting.startCommand;
dispatcher.setRuntimeSettings(projectId, runtimeSetting);
} catch (ex) {
if (
ex.response?.data?.message &&
Expand Down

0 comments on commit d476007

Please sign in to comment.