Skip to content

Commit

Permalink
Don't allow null values in tally urls
Browse files Browse the repository at this point in the history
  • Loading branch information
kaaloo committed Mar 25, 2024
1 parent 88f4026 commit ae929e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion site-observable/docs/movies.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ if (results.length > 0) {
production_countries,
genres,
}) => {
const url = `${tallyUrl}?id=${id}&original_title=${original_title}&production_year=${production_year}&production_countries=${production_countries}&genres=${genres}`;
const url = `${tallyUrl}?id=${id}&original_title=${original_title}&production_year=${production_year}&production_countries=${
production_countries || ""
}&genres=${genres || ""}`;
display(html`<a href="${url}">${title}</a><br />`);
}
);
Expand Down
4 changes: 3 additions & 1 deletion site-observable/docs/series.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ if (results.length > 0) {
results
.slice(0, 20)
.forEach(({ id, name, original_name, production_countries }) => {
const url = `${tallyUrl}?id=${id}&original_name=${original_name}&production_countries=${production_countries}`;
const url = `${tallyUrl}?id=${id}&original_name=${original_name}&production_countries=${
production_countries || ""
}`;
display(html`<a href="${url}"> ${name} </a><br />`);
});
} else {
Expand Down

0 comments on commit ae929e3

Please sign in to comment.