Skip to content

Commit

Permalink
removing inproper use of the js object property
Browse files Browse the repository at this point in the history
  • Loading branch information
Filienko committed Jan 9, 2024
1 parent 4c3336c commit d872f8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions patientsearch/src/js/context/PatientListContextProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,13 @@ export default function PatientListContextProvider({ children }) {
.map((item) => item.resource)
.sort((a, b) => parseInt(b.id) - parseFloat(a.id));
const activeEntries = entries.filter((item) => {
if (!item.hasOwnProperty('active')) {
if (typeof item.active === "undefined") {
return true;
}
return String(item.active).toLowerCase() === "true";
});
const inactiveEntries = entries.filter((item) => {
if (!item.hasOwnProperty('active')) {
if (typeof item.active === "undefined") {
return false;
}
return String(item.active).toLowerCase() === "false";
Expand All @@ -781,6 +781,7 @@ export default function PatientListContextProvider({ children }) {
: getFirstResourceFromFhirBundle(bundleResult);
rowData.resource = {
...entryToUse,
active: true ? (params && params.useActiveFlag) : undefined,

Check failure on line 784 in patientsearch/src/js/context/PatientListContextProvider.js

View workflow job for this annotation

GitHub Actions / ESLint

patientsearch/src/js/context/PatientListContextProvider.js#L784

Unexpected constant condition (no-constant-condition)
};
rowData.id = entryToUse.id;
}
Expand Down

0 comments on commit d872f8b

Please sign in to comment.