Adds vocabulary to the wanikani dashboard
< 腳本Vocabulary for Wanikani的回應
Sort bug
I found a bug in the vocab sort function. Array.sort() expect the function to return an integer and not a boolean.
Array.sort()
integer
boolean
You should change
vocabList.sort((left, right) => {return left.level > right.level;});
to
vocabList.sort((left, right) => {return left.level - right.level;});
Fixed
登入以回覆
Sort bug
I found a bug in the vocab sort function.
Array.sort()expect the function to return anintegerand not aboolean.You should change
to