Skip to content

Commit

Permalink
Merge pull request mozilla#8053 from Snuffleupagus/DEFAULT_URL-chromecom
Browse files Browse the repository at this point in the history
[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)
  • Loading branch information
Rob--W authored Feb 10, 2017
2 parents 765a54f + ce3f1a9 commit babfef1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/chromecom.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals chrome, DEFAULT_URL */
/* globals chrome */

'use strict';

Expand Down Expand Up @@ -351,7 +351,9 @@

var ChromeExternalServices = Object.create(DefaultExernalServices);
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);
});
};
Expand Down

0 comments on commit babfef1

Please sign in to comment.