[Chromium addon] Prevent errors that break the addon, caused by the DEFAULT_URL constant being replaced by a defaultUrl viewer configuration parameter (PR 8046 follow-up)

I missed this during review, sorry about that!

Fixes 8051.
This commit is contained in:
Jonas Jenwald 2017-02-10 10:42:26 +01:00
parent 32856f0adb
commit 190c8398ba

View File

@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals chrome, DEFAULT_URL */ /* globals chrome */
'use strict'; 'use strict';
@ -351,7 +351,9 @@
var ChromeExternalServices = Object.create(DefaultExernalServices); var ChromeExternalServices = Object.create(DefaultExernalServices);
ChromeExternalServices.initPassiveLoading = function (callbacks) { ChromeExternalServices.initPassiveLoading = function (callbacks) {
ChromeCom.resolvePDFFile(DEFAULT_URL, function (url, length, originalURL) { var appConfig = PDFViewerApplication.appConfig;
ChromeCom.resolvePDFFile(appConfig.defaultUrl,
function (url, length, originalURL) {
callbacks.onOpenWithURL(url, length, originalURL); callbacks.onOpenWithURL(url, length, originalURL);
}); });
}; };