Skip to content

Commit

Permalink
Merge pull request umami-software#650 from foxytocin/master
Browse files Browse the repository at this point in the history
prevents crashes if NULL is entered as a referrer in the database
  • Loading branch information
mikecao committed May 13, 2021
2 parents b896ea4 + bd8f72d commit d6c48fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const refFilter = (data, { domain, domainOnly, raw }) => {
const links = {};

const isValidRef = ref => {
return ref !== '' && !ref.startsWith('/') && !ref.startsWith('#');
return ref !== '' && ref !== null && !ref.startsWith('/') && !ref.startsWith('#');
};

if (raw) {
Expand Down

0 comments on commit d6c48fa

Please sign in to comment.