Skip to content

Commit 0a9aed0

Browse files
committed
Redirections
1 parent e5bd328 commit 0a9aed0

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@puzzle-js/client-lib",
33
"main": "dist/index.js",
4-
"version": "1.2.2",
4+
"version": "1.2.3",
55
"author": "<emre.kul@trendyol.com>",
66
"license": "MIT",
77
"repository": {
@@ -34,4 +34,4 @@
3434
"webpack": "^4.30.0",
3535
"webpack-cli": "^3.3.4"
3636
}
37-
}
37+
}

src/core.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ export class Core extends Module {
157157
});
158158
}
159159

160+
if (res['$headers'] && res['$headers'].location) {
161+
return location.href = res['$headers'].location;
162+
}
163+
160164
Object.keys(res).forEach(key => {
161165
if (!key.startsWith('$')) {
162166
const container = document.querySelector(this.getFragmentContainerSelector(fragment, key));

0 commit comments

Comments
 (0)