I would like to know what the following code does as I am having issues with a custom configurable selector + AJAX preview from the category list view.
var separatorIndex = window.location.href.indexOf('#');
if (separatorIndex != -1) {
var paramsStr = window.location.href.substr(separatorIndex+1);
var urlValues = paramsStr.toQueryParams();
if (!this.values) {
this.values = {};
}
for (var i in urlValues) {
this.values[i] = urlValues[i];
}
}
The error I get is Uncaught TypeError: Cannot read property 'config' of undefined
This only happens when I have a hash in the URL (layered nav).
1 Answer