Skip to content

Commit

Permalink
fix: bug in model
Browse files Browse the repository at this point in the history
  • Loading branch information
ah-rahimi committed Apr 20, 2023
1 parent 342ba57 commit f04412b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controllers/Modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function __construct(?string $customKey = null, bool $open = false)
$this->open = $open;

// replace all characters except letters, numbers , _ and - to _
$this->customKey = preg_replace('/[^a-zA-Z0-9_-]/', '_', $customKey);
$this->customKey = $customKey ? preg_replace('/[^a-zA-Z0-9_-]/', '_', $customKey) : null;
}

public static function make(?string $customKey = null): Modal
Expand Down

0 comments on commit f04412b

Please sign in to comment.