Browse Source

修复表单事件拦截功能异常问题

jqh 4 years ago
parent
commit
fdfb674dd3
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/Form.php

+ 4 - 4
src/Form.php

@@ -535,13 +535,13 @@ class Form implements Renderable
 
             $this->build();
 
-            if (($response = $this->callDeleting()) instanceof Response) {
+            if ($response = $this->callDeleting()) {
                 return $response;
             }
 
             $result = $this->repository->delete($this, $data);
 
-            if (($response = $this->callDeleted($result)) instanceof Response) {
+            if ($response = $this->callDeleted($result)) {
                 return $response;
             }
 
@@ -681,7 +681,7 @@ class Form implements Renderable
     {
         $this->inputs = $this->removeIgnoredFields($data);
 
-        if (($response = $this->callSaving()) instanceof Response) {
+        if ($response = $this->callSaving()) {
             return $response;
         }
 
@@ -776,7 +776,7 @@ class Form implements Renderable
 
             $updated = $this->repository->update($this);
 
-            if (($response = $this->callSaved($updated))) {
+            if ($response = $this->callSaved($updated)) {
                 return $this->sendResponse($response);
             }