Skip to content

Commit

Permalink
Merge pull request #6 from KlattG/patch-6
Browse files Browse the repository at this point in the history
Update Step 35 Detail.controller.ts
  • Loading branch information
KlattG authored Oct 1, 2024
2 parents 09123b7 + 62700ac commit 0a0e071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion steps/35/webapp/controller/Detail.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Controller from "sap/ui/core/mvc/Controller";
import Component from "../Component";
import { Route$PatternMatchedEvent } from "sap/ui/core/routing/Route";
import History from "sap/ui/core/routing/History";
import UIComponent from "sap/ui/core/ UIComponent";
import MessageToast from "sap/m/MessageToast";
import ProductRating, { ProductRating$ChangeEvent } from "../control/ProductRating";
import ResourceBundle from "sap/base/i18n/ResourceBundle";
Expand Down Expand Up @@ -39,7 +40,7 @@ export default class Detail extends Controller {
if (previousHash !== undefined) {
window.history.go(-1);
} else {
const router = (this.getOwnerComponent() as Component).getRouter();
const router = UIComponent.getRouterFor(this);
router.navTo("overview", {}, true);
}
}
Expand Down

0 comments on commit 0a0e071

Please sign in to comment.