Browse Source

Fix Profile\View page

Visman 2 years ago
parent
commit
ab43a46433
1 changed files with 7 additions and 5 deletions
  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;
     }