Add error handling

This commit is contained in:
Annie Huang committed 2023-11-20 15:41:08 +08:00
1 parent 2837354456
commit 83994106a0
1 file changed
+5
+5
View File
@@ -93,11 +93,16 @@ function getOption(quests, progress) {
unlocked: node.requirements.every((req) => progress[req]?.completed),
}))
const lineAppearence = (node) => {
try {
const { unlocked } = node
return {
type: unlocked ? 'line' : 'dashed',
color: unlocked ? '#ADADB5' : '#454552',
}
} catch (err) {
console.error(err)
throw err
}
}
const edges = dag.getEdgesArray().map((edge) => ({
source: edge[0],