Authored by runner

brand search update

... ... @@ -148,7 +148,7 @@ function bindWriteLocal($brandList, list) {
}
if (localStorage) {
if (isLocalStorageSupported) {
if (isLocalStorageSupported()) {
historys = localStorage.getItem('historys-brand');
}
... ... @@ -167,8 +167,9 @@ function bindWriteLocal($brandList, list) {
}
historys += query + ranToken;
localStorage.setItem('historys-brand', historys);
if (isLocalStorageSupported()) {
localStorage.setItem('historys-brand', historys);
}
}
if (list) {
... ... @@ -432,7 +433,9 @@ if ($('.brand-search-page').length > 0) {
chHammer = new Hammer($clearHistory[0]);
chHammer.on('tap', function() {
localStorage.removeItem('historys-brand');
if (isLocalStorageSupported()) {
localStorage.removeItem('historys-brand');
}
$history.html('');
$historySearch.hide();
... ...