Skip to content

Commit f6c4cde

Browse files
committed
Update the algolia bundle file and removed the jquery depandency from bundle file
1 parent 907d089 commit f6c4cde

File tree

6 files changed

+36
-33
lines changed

6 files changed

+36
-33
lines changed

view/adminhtml/web/js/support.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
requirejs(['algoliaAdminBundle'], function(algoliaBundle) {
2-
algoliaBundle.$(function ($) {
1+
requirejs([
2+
'jquery',
3+
'algoliaAdminBundle'
4+
], function($, algoliaBundle) {
5+
$(function ($) {
36
handleLatestVersion($);
47

58
if ($('#search_box').length > 0) {

view/frontend/web/insights.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ define(
109109

110110
var self = this;
111111

112-
algoliaBundle.$(function ($) {
112+
$(function ($) {
113113
$(self.config.autocomplete.selector).on('autocomplete:selected', function (e, suggestion) {
114114
var eventData = self.buildEventData(
115115
'Clicked', suggestion.objectID, suggestion.__indexName, suggestion.__position, suggestion.__queryID
@@ -278,7 +278,7 @@ define(
278278

279279
algoliaInsights.addSearchParameters();
280280

281-
algoliaBundle.$(function ($) {
281+
$(function ($) {
282282
if (window.algoliaConfig) {
283283
algoliaInsights.track(algoliaConfig);
284284
}

view/frontend/web/instantsearch.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
define(
2-
[
3-
'algoliaBundle',
4-
'Magento_Catalog/js/price-utils',
5-
'algoliaCommon',
6-
'algoliaInsights',
7-
'algoliaHooks'
8-
],
9-
function (algoliaBundle, priceUtils) {
10-
algoliaBundle.$(function ($) {
2+
[
3+
'jquery',
4+
'algoliaBundle',
5+
'Magento_Catalog/js/price-utils',
6+
'algoliaCommon',
7+
'algoliaInsights',
8+
'algoliaHooks'
9+
],
10+
function ($, algoliaBundle, priceUtils) {
11+
$(function ($) {
1112
/** We have nothing to do here if instantsearch is not enabled **/
1213
if (typeof algoliaConfig === 'undefined' || !algoliaConfig.instant.enabled || !(algoliaConfig.isSearchPage || !algoliaConfig.autocomplete.enabled)) {
1314
return;

view/frontend/web/internals/algoliaBundle.min.js

100755100644
Lines changed: 15 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/frontend/web/internals/algoliaBundle.min.js.map

100755100644
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

view/frontend/web/recommend.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
define([
2+
'jquery',
23
'algoliaBundle',
34
'recommend',
45
'recommendJs',
56
'recommendProductsHtml',
67
'domReady!'
7-
],function (algoliaBundle, recommend, recommendJs, recommendProductsHtml) {
8+
],function ($, algoliaBundle, recommend, recommendJs, recommendProductsHtml) {
89
'use strict';
910

1011
if (typeof algoliaConfig === 'undefined') {
1112
return;
1213
}
1314

1415
return function (config, element) {
15-
algoliaBundle.$(function ($) {
16+
$(function ($) {
1617
this.defaultIndexName = algoliaConfig.indexName + '_products';
1718
const appId = algoliaConfig.applicationId;
1819
const apiKey = algoliaConfig.apiKey;

0 commit comments

Comments
 (0)