瀏覽代碼

Fix Profile\View page

Visman 2 年之前
父節點
當前提交
ab43a46433
共有 1 個文件被更改,包括 7 次插入5 次删除
  1. 7 5
      app/Models/Pages/Profile/View.php

+ 7 - 5
app/Models/Pages/Profile/View.php

@@ -391,11 +391,13 @@ class View extends Profile
             ];
             ];
         }
         }
 
 
-        $form['sets']['private'] = [
-            'class'  => ['data'],
-            'legend' => 'Private information',
-            'fields' => $fields,
-        ];
+        if (! empty($fields)) {
+            $form['sets']['private'] = [
+                'class'  => ['data'],
+                'legend' => 'Private information',
+                'fields' => $fields,
+            ];
+        }
 
 
         return $form;
         return $form;
     }
     }