Skip to content

Commit

Permalink
Fix null failback
Browse files Browse the repository at this point in the history
  • Loading branch information
hxtree committed Jan 2, 2022
1 parent 1d5abe1 commit eb7f237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Element/AbstractElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ public function getId(): string
}

/**
* Get live arg by name
* Get live arg by name if exists
*
* @param string $name
* @return mixed|null
*/
public function getArgByName(string $name)
{
$args = $this->getArgs();
return $args[$name];
return $args[$name] ?? null;
}

/**
Expand Down

0 comments on commit eb7f237

Please sign in to comment.