Skip to content

Commit 30ed8eb

Browse files
committed
fix(view): correct null handling in parser scope property
1 parent 27cc963 commit 30ed8eb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/view/src/Parser/TempestViewParser.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ final class TempestViewParser
99
private array $scope = [];
1010

1111
private ?Token $currentScope {
12-
get => $this->scope[array_key_last($this->scope) ?? ''] ?? null;
12+
get {
13+
$lastKey = array_key_last($this->scope);
14+
return $lastKey !== null ? $this->scope[$lastKey] : null;
15+
}
1316
}
1417

1518
public function __construct(

0 commit comments

Comments
 (0)