Skip to content

Commit 76fa984

Browse files
committed
fix: another repair for htmlstring
1 parent ef38b9f commit 76fa984

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/Forms/Form.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ public function asModal($triggerContent = null, $triggerClass = null, $message =
725725

726726
$centered = (config('forms.modal-centered')) ? 'modal-dialog-centered' : '';
727727

728-
$html = <<<Modal
728+
return <<<Modal
729729
<div id="{$modalId}" class="modal fade" tabindex="-1" role="dialog">
730730
<div class="modal-dialog {$centered} modal-dialog-scrollable" role="document">
731731
<div class="modal-content">
@@ -750,8 +750,6 @@ class="{$triggerClass}"
750750
{$triggerContent}
751751
</button>
752752
Modal;
753-
754-
return $this->toHtmlString($html);
755753
}
756754

757755
/**
@@ -790,7 +788,7 @@ protected function toHtmlString($html)
790788
*/
791789
public function __toString()
792790
{
793-
return $this->toHtmlString($this->html);
791+
return $this->html;
794792
}
795793

796794
/**
@@ -800,7 +798,7 @@ public function __toString()
800798
*/
801799
public function render()
802800
{
803-
return $this->toHtmlString($this->html);
801+
return $this->html;
804802
}
805803

806804
/**
@@ -810,7 +808,7 @@ public function render()
810808
*/
811809
public function renderForLivewire()
812810
{
813-
return $this->toHtmlString("<div wire:ignore>{$this->html}</div>");
811+
return "<div wire:ignore>{$this->html}</div>";
814812
}
815813

816814
/**

0 commit comments

Comments
 (0)