2

On the Magento 2.2.6 checkout page, there is a javascript error in IE 11. The error is coming from the default.js file.

Note : its working fine on all other browsers except IE11.

JavaScript Console: showing the error "Expected identifier"

2
  • Working fine after answer
    – Dev Link
    Jun 17, 2019 at 8:28
  • Issue only with IE 11 device only
    – Dev Link
    Jun 17, 2019 at 8:29

1 Answer 1

2

This error is coming from Amazon payment gateway if enable on checkout. The error is coming from the amazonlogin.js. which is located in following path :

/vendor/amzn/amazon-pay-module/view/frontend/web/js/view/payment/method-renderer/amazonlogin.js

In your JS please do following changes

Currently

function ($,
    Component,
    ko,
    amazonStorage,
    storage,
    amazonPaymentConfig,
    registry,
    loginButton,
) {

Suggested Fix

function ($,
    Component,
    ko,
    amazonStorage,
    storage,
    amazonPaymentConfig,
    registry,
    loginButton
) {

Please remove "," after loginButton. please apply changes and let me know if you get any issue.

3
  • 1
    Thanks for your ans, let me check with your solution.
    – Dev Link
    Jun 14, 2019 at 10:28
  • 1
    Its working fine for me
    – Dev Link
    Jun 14, 2019 at 10:45
  • 1
    Thanks :) Appreciated :)
    – Dev Link
    Jun 14, 2019 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.