Skip to content

Commit

Permalink
chore: add checks to ensure no bad data stored
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-mccombs committed Jan 28, 2021
1 parent be8f088 commit 4431281
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/cached-resources/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ async function residentQuery(queryParams) {

async function cacheResidentData(queryParams) {
const records = await residentQuery(queryParams);
storeData(records, 'residentData');
console.log("Stored records")
if (records !== null && records !== undefined && records !== '') {
storeData(records, 'residentData');
console.log("Stored records")
}
}

async function cacheAutofillData(parameter) {
Expand Down

0 comments on commit 4431281

Please sign in to comment.