Skip to content

Commit d60c121

Browse files
committed
fix bug
1 parent 08a8c48 commit d60c121

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

collector/sprite/collect_desc.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import sys
66

77

8-
VERSION = '4.4'
8+
VERSION = '4.5'
99

1010

1111
js_code = '''
@@ -28,7 +28,8 @@
2828
first_c = first_c.children[1]
2929
name = first_c.children[0].innerText
3030
type = (first_c.children[1] && first_c.children[1].innerText) || 'Unknown'
31-
desc = second_c.children[0].children[0].innerText
31+
if (!second_c) continue
32+
desc = second_c ? second_c.children[0].children[0].innerText : ''
3233
// console.log(name, type, desc)
3334
let key = 'SKILL_' + cname + '_' + type.toUpperCase() + '/' + name
3435
res.push([key, {
@@ -41,7 +42,7 @@
4142
}
4243
}
4344
}])
44-
let other_descs = second_c.children[0].children[1]
45+
let other_descs = second_c ? second_c.children[0].children[1] : undefined
4546
if (other_descs != undefined) {
4647
// contains other descs
4748
for (j = 0; j < other_descs.children.length; j++) {

0 commit comments

Comments
 (0)