Merge pull request #4198 from naresh-webkul/4110

fixed issue #4110
This commit is contained in:
Jitendra Singh 2020-10-28 15:39:37 +05:30 committed by GitHub
commit a248d7ced6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -131,7 +131,13 @@ class Toolbar extends AbstractProduct
{
$params = request()->input();
if (isset($params['mode']) && $key == $params['mode']) {
$defaultMode = core()->getConfigData('catalog.products.storefront.mode')
? core()->getConfigData('catalog.products.storefront.mode')
: 'grid';
if (request()->input() == null && $key == $defaultMode) {
return true;
} else if (isset($params['mode']) && $key == $params['mode']) {
return true;
}