Merge pull request #650 from foxytocin/master

prevents crashes if NULL is entered as a referrer in the database
This commit is contained in:
Mike Cao 2021-05-12 19:27:01 -07:00 committed by GitHub
commit d6c48fa121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ export const refFilter = (data, { domain, domainOnly, raw }) => {
const links = {}; const links = {};
const isValidRef = ref => { const isValidRef = ref => {
return ref !== '' && !ref.startsWith('/') && !ref.startsWith('#'); return ref !== '' && ref !== null && !ref.startsWith('/') && !ref.startsWith('#');
}; };
if (raw) { if (raw) {