FIX: Scroll to top shortcut regressed in b757275 (#27807)

This commit is contained in:
Jarek Radosz 2024-07-10 00:19:45 +02:00 committed by GitHub
parent 08891ccf06
commit 0165460626
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -340,11 +340,11 @@ export default Controller.extend(bufferedProperty("model"), {
@action
jumpTop(event) {
if (wantsNewWindow(event)) {
if (event && wantsNewWindow(event)) {
return;
}
event.preventDefault();
event?.preventDefault();
DiscourseURL.routeTo(this.get("model.firstPostUrl"), {
skipIfOnScreen: false,
keepFilter: true,