@ -51,7 +51,7 @@ class Category extends Controller
$model = new CategoryModel;
$hasGoods = GoodsCategoryRel::getcategory($this->storeId,$merchantId);
$arr = [];
if (!empty($hasGoods)) {
if (isset($hasGoods['data']) && !empty($hasGoods['data'])) {
foreach ($hasGoods['data'] as $v) {
$arr[] = $v['category_id'];
}