Skip to content

Commit

Permalink
WIP: making records without active attribute act as active
Browse files Browse the repository at this point in the history
  • Loading branch information
Filienko committed Jan 7, 2024
1 parent bf890d3 commit 4c3336c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 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 (!item.hasOwnProperty('active')) {

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

View workflow job for this annotation

GitHub Actions / ESLint

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

Do not access Object.prototype method 'hasOwnProperty' from target object (no-prototype-builtins)
return true;
}
return String(item.active).toLowerCase() === "true";
});
const inactiveEntries = entries.filter((item) => {
if (item.hasOwnProperty('active')) {
if (!item.hasOwnProperty('active')) {

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

View workflow job for this annotation

GitHub Actions / ESLint

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

Do not access Object.prototype method 'hasOwnProperty' from target object (no-prototype-builtins)
return false;
}
return String(item.active).toLowerCase() === "false";
Expand Down

0 comments on commit 4c3336c

Please sign in to comment.