Skip to content

Commit

Permalink
fix: use Boolean to filter falsy values
Browse files Browse the repository at this point in the history
  • Loading branch information
broofa committed Apr 22, 2021
1 parent 1eb8a3e commit 1ec4790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function queryFromLocation() {
return decodeURIComponent(q ?? '')
.split(',')
.map(v => v.trim())
.filter(v => v);
.filter(Boolean);
}

export const activity = new LoadActivity();
Expand Down
2 changes: 1 addition & 1 deletion js/Inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default function Inspector({ className, ...props }) {
const names = e.currentTarget.value
.split(',')
.map(v => v.trim())
.filter(v => v);
.filter(Boolean);
const query = [...new Set(names)]; // De-dupe

// Update location
Expand Down

0 comments on commit 1ec4790

Please sign in to comment.