Skip to content

Commit

Permalink
fix: Avoid using variable name "module" (OHIF#942)
Browse files Browse the repository at this point in the history
On some configurations variables named `module` may clash with the predefined JS global.
resolves OHIF#940
  • Loading branch information
ivan-aksamentov authored and swederik committed Sep 23, 2019
1 parent 882d04c commit 72427fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions platform/core/src/studies/retrieveStudyMetadata.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import RetrieveMetadata from './services/wado/retrieveMetadata.js';

const module = 'RetrieveStudyMetadata';
const moduleName = 'RetrieveStudyMetadata';
// Cache for promises. Prevents unnecessary subsequent calls to the server
const StudyMetaDataPromises = new Map();

Expand All @@ -17,11 +17,11 @@ export function retrieveStudyMetadata(server, studyInstanceUid) {
// corresponding promise from the "StudyMetaDataPromises" map...

if (!server) {
throw new Error(`${module}: Required 'server' parameter not provided.`);
throw new Error(`${moduleName}: Required 'server' parameter not provided.`);
}
if (!studyInstanceUid) {
throw new Error(
`${module}: Required 'studyInstanceUid' parameter not provided.`
`${moduleName}: Required 'studyInstanceUid' parameter not provided.`
);
}

Expand Down

0 comments on commit 72427fe

Please sign in to comment.