Commit fc1bbeff authored by jakeburden's avatar jakeburden

Replace mountedToShow with onSingleEnvironmentPage

parent ebe5d683
......@@ -145,7 +145,7 @@ export default {
deleteEnvironment(environment) {
const endpoint = environment.delete_path;
const mountedToShow = environment.mounted_to_show;
const { onSingleEnvironmentPage } = environment;
const errorMessage = s__(
'Environments|An error occurred while deleting the environment. Check if the environment stopped; if not, stop it and try again.',
);
......@@ -153,7 +153,7 @@ export default {
this.service
.deleteAction(endpoint)
.then(() => {
if (!mountedToShow) {
if (!onSingleEnvironmentPage) {
// Reload as a first solution to bust the ETag cache
window.location.reload();
return;
......
......@@ -15,7 +15,7 @@ export default () => {
data() {
const environment = JSON.parse(JSON.stringify(container.dataset));
environment.delete_path = environment.deletePath;
environment.mounted_to_show = true;
environment.onSingleEnvironmentPage = true;
return {
environment,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment