Merge pull request #4771 from Snuffleupagus/api-promise-reject-fix
Fix typo when rejecting Promise in getPage
This commit is contained in:
commit
2acb40fffb
@ -1005,7 +1005,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||||||
getPage: function WorkerTransport_getPage(pageNumber, capability) {
|
getPage: function WorkerTransport_getPage(pageNumber, capability) {
|
||||||
if (pageNumber <= 0 || pageNumber > this.numPages ||
|
if (pageNumber <= 0 || pageNumber > this.numPages ||
|
||||||
(pageNumber|0) !== pageNumber) {
|
(pageNumber|0) !== pageNumber) {
|
||||||
return new Promise.reject(new Error('Invalid page request'));
|
return Promise.reject(new Error('Invalid page request'));
|
||||||
}
|
}
|
||||||
|
|
||||||
var pageIndex = pageNumber - 1;
|
var pageIndex = pageNumber - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user