Skip to content

Commit e2ce048

Browse files
committed
from krasimir#333 , Fix getCurrentURLPath error
1 parent 863eef7 commit e2ce048

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

src/middlewares/setLocationPath.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { QContext } from "../../index";
22
import { getCurrentEnvURL } from "../utils";
33

4-
export default function setLocationPath(context: QContext, done: () => void): void {
5-
6-
const { currentLocationPath, instance } = context;
7-
8-
if (typeof currentLocationPath === "undefined") {
9-
context.currentLocationPath = context.to = getCurrentURLPath(instance.root);
4+
export default function setLocationPath(context: QContext, done) {
5+
if (typeof context.currentLocationPath === "undefined") {
6+
context.currentLocationPath = context.to = getCurrentEnvURL(
7+
context.instance.root
8+
);
109
}
11-
12-
context.currentLocationPath = instance._checkForAHash(currentLocationPath);
13-
10+
context.currentLocationPath = context.instance._checkForAHash(
11+
context.currentLocationPath
12+
);
1413
done();
1514
}

0 commit comments

Comments
 (0)