diff --git a/app/code/Magento/Catalog/view/frontend/web/js/product/breadcrumbs.js b/app/code/Magento/Catalog/view/frontend/web/js/product/breadcrumbs.js index d3596cdd100ec..032b8541939c3 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/product/breadcrumbs.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/product/breadcrumbs.js @@ -20,23 +20,6 @@ define([ menuContainer: '[data-action="navigation"] > ul' }, - /** @inheritdoc */ - _init: function () { - var menu, - originalInit = this._super.bind(this); - - // render breadcrumbs after navigation menu is loaded. - menu = $(this.options.menuContainer).data('mageMenu'); - - if (typeof menu === 'undefined') { - $(this.options.menuContainer).on('menucreate', function () { - originalInit(); - }); - } else { - this._super(); - } - }, - /** @inheritdoc */ _render: function () { this._appendCatalogCrumbs(); @@ -89,14 +72,10 @@ define([ * @private */ _getCategoryCrumb: function (menuItem) { - var categoryId = /(\d+)/i.exec(menuItem.attr('id'))[0], - categoryName = menuItem.text(), - categoryUrl = menuItem.attr('href'); - return { - 'name': 'category' + categoryId, - 'label': categoryName, - 'link': categoryUrl, + 'name': 'category', + 'label': menuItem.text(), + 'link': menuItem.attr('href'), 'title': '' }; }, diff --git a/dev/tests/js/jasmine/tests/app/code/Magento/Catalog/frontend/js/product/breadcrumbs.test.js b/dev/tests/js/jasmine/tests/app/code/Magento/Catalog/frontend/js/product/breadcrumbs.test.js index 2b0ee8ca7b9c0..2d8f145bce1da 100644 --- a/dev/tests/js/jasmine/tests/app/code/Magento/Catalog/frontend/js/product/breadcrumbs.test.js +++ b/dev/tests/js/jasmine/tests/app/code/Magento/Catalog/frontend/js/product/breadcrumbs.test.js @@ -20,7 +20,7 @@ define([ defaultContext = require.s.contexts._, menuItem = $( '