We are running a Magento multi site and on ONE site only, I get this error Uncaught TypeError: $.initNamespaceStorage is not a function
All sites use the same theme (just some differences between them..), any clues ?
Thank you for helping me Here is the script
require.config({
deps: [
'jquery',
'mage/translate',
'jquery/jquery-storageapi'
],
callback: function ($) {
'use strict';
var dependencies = [],
versionObj;
$.initNamespaceStorage('mage-translation-storage');
$.initNamespaceStorage('mage-translation-file-version');
versionObj = $.localStorage.get('mage-translation-file-version');
if (versionObj.version !== '92817ddfc8670bafd7f41084a570359ae57c4623') {
dependencies.push(
'text!js-translation.json'
);
}
require.config({
deps: dependencies,
callback: function (string) {
if (typeof string === 'string') {
$.mage.translate.add(JSON.parse(string));
$.localStorage.set('mage-translation-storage', string);
$.localStorage.set(
'mage-translation-file-version',
{
version: '92817ddfc8670bafd7f41084a570359ae57c4623'
}
);
} else {
$.mage.translate.add($.localStorage.get('mage-translation-storage'));
}
}
});
}
});