Skip to content

Commit

Permalink
Merge pull request #15 from Alkacid/patch-1
Browse files Browse the repository at this point in the history
添加检查description是否为空
  • Loading branch information
Ayideyia authored Oct 14, 2024
2 parents 2cccd6e + 659559a commit 8d17e85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/Generic/plugin-sync-configuration-gists.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ const getPrefix = () => {

const filterList = (list) => {
const prefix = getPrefix()
return list.filter((v) => v.description.startsWith(prefix)).map((v) => ({ label: v.description, value: v.id }))
return list
.filter((v) => v.description && v.description.startsWith(prefix))
.map((v) => ({ label: v.description, value: v.id }))
}

/**
Expand Down

0 comments on commit 8d17e85

Please sign in to comment.