checked the page exclusion to not be out of bounds
This commit is contained in:
parent
2949daf3ff
commit
a8d5b7e5fb
@ -49,7 +49,7 @@ export class PageExclusionComponent implements OnChanges {
|
|||||||
const splitted = range.split('-');
|
const splitted = range.split('-');
|
||||||
const startPage = parseInt(splitted[0], 10);
|
const startPage = parseInt(splitted[0], 10);
|
||||||
const endPage = splitted.length > 1 ? parseInt(splitted[1], 10) : startPage;
|
const endPage = splitted.length > 1 ? parseInt(splitted[1], 10) : startPage;
|
||||||
if (!startPage || !endPage) {
|
if (!startPage || !endPage || startPage > this.file.numberOfPages || endPage > this.file.numberOfPages) {
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user