Skip to content

Commit

Permalink
feat: Add empty array judgment
Browse files Browse the repository at this point in the history
  • Loading branch information
empty-233 committed Apr 15, 2024
1 parent 29c07d1 commit 1e0df45
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ bangumi_data_paths.map((path) => {
typeMatching.length !== 0
? typeMatching[typeMatching.length - 1]
: aods[aods.length - 1];
aod.relations.map((url) => {
const result = splitUrl(url);
bangumiData.sites.push({
site: result.domain,
id: result.path,
if (aod.relations)
aod.relations.map((url) => {
const result = splitUrl(url);
bangumiData.sites.push({
site: result.domain,
id: result.path,
});
});
});
const data = {
...bangumiData,
animeSeason: {
Expand Down

0 comments on commit 1e0df45

Please sign in to comment.