ソースを参照

Allergies - if no entries give 1 blank entry to start with

Vijayakrishnan 4 年 前
コミット
1364739085

+ 1 - 10
resources/views/app/patient/canvas-sections/allergies/form.blade.php

@@ -1,5 +1,5 @@
 <?php
-if(!$contentData) {
+if(!$contentData || !isset($contentData['items']) || !count($contentData['items'])) {
     $contentData = [
         "items" => [
             [
@@ -10,15 +10,6 @@ if(!$contentData) {
     ];
 }
 
-if(!isset($contentData['items'])){
-    $contentData['items'] =  [
-        [
-            "title" => "",
-            "detail" => "",
-        ]
-    ];
-}
-
 $formID = rand(0, 100000);
 ?>
 <div id="allergySection">