Browse Source

Merge remote-tracking branch 'github/2.0' into github

jqh 3 years ago
parent
commit
a4da3d3d58
2 changed files with 8 additions and 1 deletions
  1. 3 1
      resources/views/grid/dropdown-actions.blade.php
  2. 5 0
      src/Exception/Handler.php

+ 3 - 1
resources/views/grid/dropdown-actions.blade.php

@@ -1,3 +1,4 @@
+@if (!empty($default) || !empty($custom))
 <div class="grid-dropdown-actions dropdown">
 <div class="grid-dropdown-actions dropdown">
     <a href="#" style="padding:0 10px;" data-toggle="dropdown">
     <a href="#" style="padding:0 10px;" data-toggle="dropdown">
         <i class="feather icon-more-vertical"></i>
         <i class="feather icon-more-vertical"></i>
@@ -19,4 +20,5 @@
             @endforeach
             @endforeach
         @endif
         @endif
     </ul>
     </ul>
-</div>
+</div>
+@endif

+ 5 - 0
src/Exception/Handler.php

@@ -4,6 +4,7 @@ namespace Dcat\Admin\Exception;
 
 
 use Dcat\Admin\Contracts\ExceptionHandler;
 use Dcat\Admin\Contracts\ExceptionHandler;
 use Dcat\Admin\Support\Helper;
 use Dcat\Admin\Support\Helper;
+use Illuminate\Http\Exceptions\HttpResponseException;
 use Illuminate\Support\MessageBag;
 use Illuminate\Support\MessageBag;
 use Illuminate\Support\ViewErrorBag;
 use Illuminate\Support\ViewErrorBag;
 
 
@@ -18,6 +19,10 @@ class Handler implements ExceptionHandler
      */
      */
     public function handle(\Throwable $e)
     public function handle(\Throwable $e)
     {
     {
+        if ($e instanceof HttpResponseException) {
+            throw $e;
+        }
+
         $this->report($e);
         $this->report($e);
 
 
         return $this->render($e);
         return $this->render($e);