mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
Add error handling
This commit is contained in:
1 parent
2837354456
commit
83994106a0
1 file changed
+5
@@ -93,11 +93,16 @@ function getOption(quests, progress) {
|
|||||||
unlocked: node.requirements.every((req) => progress[req]?.completed),
|
unlocked: node.requirements.every((req) => progress[req]?.completed),
|
||||||
}))
|
}))
|
||||||
const lineAppearence = (node) => {
|
const lineAppearence = (node) => {
|
||||||
|
try {
|
||||||
const { unlocked } = node
|
const { unlocked } = node
|
||||||
return {
|
return {
|
||||||
type: unlocked ? 'line' : 'dashed',
|
type: unlocked ? 'line' : 'dashed',
|
||||||
color: unlocked ? '#ADADB5' : '#454552',
|
color: unlocked ? '#ADADB5' : '#454552',
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err)
|
||||||
|
throw err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const edges = dag.getEdgesArray().map((edge) => ({
|
const edges = dag.getEdgesArray().map((edge) => ({
|
||||||
source: edge[0],
|
source: edge[0],
|
||||||
|
|||||||
Reference in new issue
Block a user