Browse Source

CDB: fix separators reveal

lviguier 6 months ago
parent
commit
b275ab171f
1 changed files with 5 additions and 2 deletions
  1. 5 2
      hide/comp/cdb/Table.hx

+ 5 - 2
hide/comp/cdb/Table.hx

@@ -396,8 +396,11 @@ class Table extends Component {
 	public function revealLine(line: Int) {
 		if (this.separators == null) return;
 		for (sIdx in 0...this.separators.length) {
-			if (this.separators[sIdx].data.index > line)
-				this.separators[sIdx - 1].reveal();
+			if (this.separators[sIdx].data.index > line) {
+				if (sIdx - 1 >= 0)
+					this.separators[sIdx - 1].reveal();
+				break;
+			}
 		}
 	}