Skip to content

Commit 8cccebb

Browse files
Merge pull request #22 from puzzle-js/remove-query-param-source
Remove query param source
2 parents 06007f0 + 0699d1c commit 8cccebb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
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.4.1",
4+
"version": "1.4.2",
55
"author": "<[email protected]>",
66
"license": "MIT",
77
"repository": {

src/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ export class Core extends Module {
186186
private static prepareQueryString(fragmentAttributes: Record<string, string>) {
187187
const attributes = Object.assign(window.location.search.slice(1).split('&').reduce((dict: { [name: string]: string }, i) => {
188188
const [key, value] = i.split('=');
189-
if (typeof value !== "undefined" && key !== "source") {
189+
if (typeof value !== "undefined") {
190190
dict[key] = value;
191191
}
192192
return dict;
193193
}, {}), fragmentAttributes);
194-
194+
delete attributes.source;
195195
return Object.keys(attributes).reduce((query: string, key: string) => `${query}&${key}=${attributes[key]}`, '?__renderMode=stream');
196196
}
197197

0 commit comments

Comments
 (0)