Changed varibale name in CategoryController

This commit is contained in:
jitendra 2022-08-09 19:38:05 +05:30
parent 1a23814e2f
commit e56ec9ffd9
1 changed files with 5 additions and 5 deletions

View File

@ -229,17 +229,17 @@ class CategoryController extends Controller
* This method will fetch all root category ids from the channel. If `id` is present,
* then it is not deletable.
*
* @param \Webkul\Category\Models\Category $category
* @param \Webkul\Category\Contracts\Category $category
* @return bool
*/
private function isCategoryDeletable($category)
{
static $rootIdInChannels;
static $channelRootCategoryIds;
if (! $rootIdInChannels) {
$rootIdInChannels = $this->channelRepository->pluck('root_category_id');
if (! $channelRootCategoryIds) {
$channelRootCategoryIds = $this->channelRepository->pluck('root_category_id');
}
return $category->id === 1 || $rootIdInChannels->contains($category->id);
return $category->id === 1 || $channelRootCategoryIds->contains($category->id);
}
}