Skip to content

Commit

Permalink
Unique names for query parameters (re #164)
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Short authored and jezdez committed May 13, 2019
1 parent 3408497 commit 66173ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/app/services/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class Parameter {
};
}
return {
[`${prefix}${this.name}`]: this.value,
[`${prefix}${this.name}_${this.queryId}`]: this.value,
};
}

Expand All @@ -188,7 +188,7 @@ export class Parameter {
this.setValue([query[keyStart], query[keyEnd]]);
}
} else {
const key = `${prefix}${this.name}`;
const key = `${prefix}${this.name}_${this.queryId}`;
if (has(query, key)) {
this.setValue(query[key]);
}
Expand Down Expand Up @@ -551,7 +551,7 @@ function QueryResource(
extend(params, param.toUrlParams());
});
}
params = map(params, (value, name) => `${encodeURIComponent(name)}=${encodeURIComponent(value)}`).join('&');
params = map(params, (value, name) => `${encodeURIComponent(name)}_${this.id}=${encodeURIComponent(value)}`).join('&');

if (params !== '') {
url += `?${params}`;
Expand Down

0 comments on commit 66173ad

Please sign in to comment.