Skip to content

Commit

Permalink
from krasimir#333 , Fix getCurrentURLPath error
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranr committed Nov 7, 2023
1 parent 863eef7 commit e2ce048
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/middlewares/setLocationPath.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { QContext } from "../../index";
import { getCurrentEnvURL } from "../utils";

export default function setLocationPath(context: QContext, done: () => void): void {

const { currentLocationPath, instance } = context;

if (typeof currentLocationPath === "undefined") {
context.currentLocationPath = context.to = getCurrentURLPath(instance.root);
export default function setLocationPath(context: QContext, done) {
if (typeof context.currentLocationPath === "undefined") {
context.currentLocationPath = context.to = getCurrentEnvURL(
context.instance.root
);
}

context.currentLocationPath = instance._checkForAHash(currentLocationPath);

context.currentLocationPath = context.instance._checkForAHash(
context.currentLocationPath
);
done();
}

0 comments on commit e2ce048

Please sign in to comment.