From 66173ade669507a30f0c182f3f23cf60966e364e Mon Sep 17 00:00:00 2001 From: Allen Short Date: Tue, 16 Jan 2018 22:06:32 +0000 Subject: [PATCH] Unique names for query parameters (re #164) --- client/app/services/query.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/app/services/query.js b/client/app/services/query.js index 75f8b16d77..6606de1547 100644 --- a/client/app/services/query.js +++ b/client/app/services/query.js @@ -175,7 +175,7 @@ export class Parameter { }; } return { - [`${prefix}${this.name}`]: this.value, + [`${prefix}${this.name}_${this.queryId}`]: this.value, }; } @@ -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]); } @@ -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}`;