FIX: Sort out the route navigation in admin/email-style (#8837)

Previously it would go to the "html" page when refreshing on the "css" page, and would open an invalid empty-state page when trying to go to the "email style" tab when already on it.
This commit is contained in:
Jarek Radosz 2020-02-04 11:42:43 +01:00 committed by GitHub
parent 4ab696dd2f
commit 67d5ce8ed1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -0,0 +1,7 @@
import Route from "@ember/routing/route";
export default Route.extend({
beforeModel() {
this.replaceWith("adminCustomizeEmailStyle.edit", "html");
}
});

View File

@ -1,10 +1,7 @@
import Route from "@ember/routing/route";
export default Route.extend({
model() {
return this.store.find("email-style");
},
redirect() {
this.transitionTo("adminCustomizeEmailStyle.edit", "html");
}
});