Jelajahi Sumber

祛除channelId=''

visuddhinanda 2 tahun lalu
induk
melakukan
5135b56f21
1 mengubah file dengan 8 tambahan dan 1 penghapusan
  1. 8 1
      app/Http/Resources/SentResource.php

+ 8 - 1
app/Http/Resources/SentResource.php

@@ -44,9 +44,16 @@ class SentResource extends JsonResource
         }else{
         }else{
             $channels = [$this->channel_uid];
             $channels = [$this->channel_uid];
         }
         }
+        //TODO 找出channel id = '' 的原因
+        $mChannels=array();
+        foreach ($channels as $key => $value) {
+            if(Str::isUuid($value)){
+                $mChannels[] = $value;
+            }
+        }
         if($request->get('html',true)){
         if($request->get('html',true)){
             $data['html'] = MdRender::render($this->content,
             $data['html'] = MdRender::render($this->content,
-                                             $channels,
+                                             $mChannels,
                                              null,
                                              null,
                                              $mode,
                                              $mode,
                                              $channel['type'],
                                              $channel['type'],