1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-05 15:32:55 +02:00

Fix spine first & last

This commit is contained in:
Fred Chasen 2017-10-17 13:57:25 -07:00
parent c6631d10b7
commit b7640a1d7d

View file

@ -214,11 +214,12 @@ class Spine {
do {
let next = this.get(index);
if (next && next.linear) {
return next;
}
index += 1;
} while (index < this.spineItems.length-1) ;
} while (index < this.spineItems.length) ;
}
last() {
@ -230,7 +231,7 @@ class Spine {
return prev;
}
index -= 1;
} while (index > 0);
} while (index >= 0);
}
destroy() {