Skip to content

Commit

Permalink
Merge pull request #236 from raveren/main
Browse files Browse the repository at this point in the history
Fix value omitted when input created with no name
  • Loading branch information
freekmurze authored Jul 3, 2024
2 parents c7f4e6f + 5f0946e commit 2b3d8e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public function datetime($name = '', $value = null, $format = true)
*
* @return \Spatie\Html\Elements\Input
*/
public function range($name = '', $value = '', $min = null, $max = null, $step = null)
public function range($name = '', $value = null, $min = null, $max = null, $step = null)
{
return $this->input('range', $name, $value)
->attributeIfNotNull($min, 'min', $min)
Expand Down Expand Up @@ -596,7 +596,7 @@ public function closeModelForm(): Htmlable
protected function old($name, $value = null)
{
if (empty($name)) {
return;
return $value;
}

// Convert array format (sth[1]) to dot notation (sth.1)
Expand Down

0 comments on commit 2b3d8e1

Please sign in to comment.