Skip to content

Commit

Permalink
fix(linked-item): fix active state for hash routing
Browse files Browse the repository at this point in the history
  • Loading branch information
anehx committed Mar 19, 2024
1 parent de5c4ff commit 1997e0a
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions addon/components/-private/linked-list-item.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { getOwner } from "@ember/application";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import Component from "@glimmer/component";
Expand All @@ -18,13 +17,6 @@ function getParams(currentRouteInfo) {
export default class LinkedListItemComponent extends Component {
@service("router") _router;

get isHashLocation() {
return (
getOwner(this).resolveRegistration("config:environment").locationType ===
"hash"
);
}

/* istanbul ignore next */
get isEngineRouter() {
return Boolean(this._router.externalRouter);
Expand Down Expand Up @@ -77,7 +69,7 @@ export default class LinkedListItemComponent extends Component {
let href = absoluteHref;

/* istanbul ignore next */
if (this.isHashLocation) {
if (href.startsWith("#/")) {
href = href.replace(/^#/, "");
}

Expand Down

0 comments on commit 1997e0a

Please sign in to comment.