fix searchHighlightVisible() for 1up mode
authorrajbot <raj@archive.org>
Mon, 18 Oct 2010 18:05:26 +0000 (18:05 +0000)
committerrajbot <raj@archive.org>
Mon, 18 Oct 2010 18:05:26 +0000 (18:05 +0000)
BookReader/BookReader.js

index f2765fb..a01ea70 100644 (file)
@@ -4257,7 +4257,8 @@ BookReader.prototype.searchHighlightVisible = function() {
     if (this.constMode2up == this.mode) {
         var visiblePages = Array(this.twoPage.currentIndexL, this.twoPage.currentIndexR);
     } else if (this.constMode1up == this.mode) {
-        var visiblePages = Array(this.currentIndex());
+        var visiblePages = Array();
+        visiblePages[0] = this.currentIndex();
     } else {
         return false;
     }