From 23df48bf0e540277348121603fcd0c368fe87ff1 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Thu, 12 Apr 2012 15:14:18 -0700 Subject: [PATCH] Fix page error handling. --- src/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.js b/src/api.js index 05e8a952f..f1baefade 100644 --- a/src/api.js +++ b/src/api.js @@ -385,7 +385,7 @@ var WorkerTransport = (function WorkerTransportClosure() { }, this); messageHandler.on('PageError', function transportError(data) { - var page = this.pageCache[data.pageNum]; + var page = this.pageCache[data.pageNum - 1]; if (page.displayReadyPromise) page.displayReadyPromise.reject(data.error); else