vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
18 stars 13 forks source link

DOMException on url with multiple trailing slashes #365

Open aloupfor opened 4 years ago

aloupfor commented 4 years ago

Current behavior

I open: https://demo.vuestorefront.io// (notice trailing //). Page does not load properly.

https://demo.vuestorefront.io/////////////////////////// has the same behavior.

Expected behavior

I open: https://demo.vuestorefront.io// (notice trailing //). Page load properly.

I do not know if it should display the same content as https://demo.vuestorefront.io or be a 404 error.

Steps to reproduce the issue

Open: https://demo.vuestorefront.io//

Repository

Can you handle fixing this bug by yourself?

Which Release Cycle state this refers to? Info for developer.

Pick one option.

Environment details

Additional information

Error displayed in browser console tab:

vue-router.esm.js:1697 Uncaught (in promise) DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'https:' cannot be created in a document with origin 'https://demo.vuestorefront.io' and URL 'https://demo.vuestorefront.io//'.
    at it (https://demo.vuestorefront.io/dist/vendor.e0b36c61b90a056a40d7.js:20:13257)
    at new e (https://demo.vuestorefront.io/dist/vendor.e0b36c61b90a056a40d7.js:20:19375)
    at new Dt (https://demo.vuestorefront.io/dist/vendor.e0b36c61b90a056a40d7.js:20:23038)
    at s (https://demo.vuestorefront.io/dist/app.e0b36c61b90a056a40d7.js:1:293169)
    at https://demo.vuestorefront.io/dist/app.e0b36c61b90a056a40d7.js:1:346891
    at https://demo.vuestorefront.io/dist/app.e0b36c61b90a056a40d7.js:1:346507
    at Object.next (https://demo.vuestorefront.io/dist/app.e0b36c61b90a056a40d7.js:1:346612)
    at https://demo.vuestorefront.io/dist/app.e0b36c61b90a056a40d7.js:1:345548
    at new Promise (<anonymous>)
    at j (https://demo.vuestorefront.io/dist/app.e0b36c61b90a056a40d7.js:1:345293)
gibkigonzo commented 4 years ago

@aloupfor thanks for reporting this issue. It is related with vsf-router https://github.com/vuejs/vue-router/issues/2593 As I see it is fixed in v4 so I think that best way is just wait for it