Skip to content

Commit

Permalink
Consider null sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
rzats committed May 17, 2024
1 parent 8771297 commit 6ccd6d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modes/indicator/IndicatorAbout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
function buildExportURL() {
let exportURL = '';
if (sensor.key.split('-').length >= 2) {
if (sensor && sensor.key.split('-').length >= 2) {
// account for dashes in the sensor
let [first, ...rest] = sensor.key.split('-');
rest = rest.join('-');
Expand All @@ -35,7 +35,6 @@
exportURL += `&geo_type=${region.level}&geo_value=${region.propertyId}`;
}
if (date) {
console.log(date);
exportURL += `&start_day=${formatDateISO(date.value)}&end_day=${formatDateISO(date.value)}`;
}
return exportURL;
Expand Down

0 comments on commit 6ccd6d0

Please sign in to comment.