Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit e40c490

Browse files
biharckswederik
authored andcommitted
fix(searchStudies.js): adding qidoRoot as a key to the cache (#57)
52
1 parent 6382329 commit e40c490

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/studies/searchStudies.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ const studySearchPromises = new Map();
99
* @returns {Promise} resolved with an array of studies information or rejected with an error
1010
*/
1111
export default function searchStudies(server, filter) {
12-
const promiseKey = JSON.stringify(filter);
12+
const promiseKeyObj = {
13+
qidoRoot: server.qidoRoot,
14+
filter,
15+
};
16+
const promiseKey = JSON.stringify(promiseKeyObj);
1317
if (studySearchPromises.has(promiseKey)) {
1418
return studySearchPromises.get(promiseKey);
1519
} else {

0 commit comments

Comments
 (0)