Skip to content

Commit

Permalink
Fix typo that causes onError to throw
Browse files Browse the repository at this point in the history
  • Loading branch information
MrOrz committed Jul 15, 2015
1 parent 05b6e91 commit 35c39f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lineMachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ class LineMachine {
case 'LEVEL_MISMATCH':
if (err.lastLevel === -1) { // top level
msg = `[Warning] 「${err.text}」(p${err.page})的文章標號從「${this._getHierarchyNotation(err.level, err.numberCH)}」開始,不符合標號階層。`;
}else {
} else {
let section = this._getCurrentSection();
if (section.numberCH) {
msg = `[Warning] 文章階層有誤:「${err.text}」(p${err.page})文章標號為「${this._getHierarchyNotation(err.level, err.numberCH)}」,但前文標號為「${this._getHierarchyNotation(section.level, section.numberCH)}」。`;
msg = `[Warning] 文章階層有誤:「${err.text}」(p${err.page})文章標號為「${this._getHierarchyNotation(err.level, err.numberCH)}」,但前文標號為「${this._getHierarchyNotation(err.lastLevel, section.numberCH)}」。`;
}else {
msg = `[Warning] 文章階層有誤:「${err.text}」(p${err.page})文章標號為「${this._getHierarchyNotation(err.level, err.numberCH)}」,但前文階層為 ${err.lastLevel}。`;
}
Expand Down

0 comments on commit 35c39f5

Please sign in to comment.