diff --git a/src/pages/Dashboard/Runtimes/Create/index.jsx b/src/pages/Dashboard/Runtimes/Create/index.jsx index 1a1b2807..97b5dd18 100644 --- a/src/pages/Dashboard/Runtimes/Create/index.jsx +++ b/src/pages/Dashboard/Runtimes/Create/index.jsx @@ -63,9 +63,10 @@ export default class CreateTestingEnv extends React.Component { } componentWillUnmount() { - const { rootStore, createEnvStore } = this.props; + const { rootStore, createEnvStore, credentialStore } = this.props; createEnvStore.reset(); rootStore.clearNotify(); + credentialStore.reset(); } @computed diff --git a/src/stores/runtime/credential.js b/src/stores/runtime/credential.js index b872ce41..2ca75d6c 100644 --- a/src/stores/runtime/credential.js +++ b/src/stores/runtime/credential.js @@ -77,4 +77,11 @@ export default class RuntimeCredentialStore extends Store { this.isLoading = false; return this.runtimeZones; }; + + reset = () => { + this.credentials = []; + this.credential = {}; + this.runtimeZones = []; + this.credentialCount = 0; + }; }