Skip to content

Commit 704ace7

Browse files
committed
Fix context handling within each iteration
1 parent b4b748a commit 704ace7

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

‎src/Runtime.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public static function hbbch(RuntimeContext $cx, string $ch, array $vars, mixed
417417
$ex = $cx->blParam[0];
418418
}
419419

420-
if ($context === null) {
420+
if ($context === null || $context === $_this) {
421421
$ret = $cb($cx, is_array($ex) ? static::merge($_this, $ex) : $_this);
422422
} else {
423423
$cx->scopes[] = $_this;

‎tests/HandlebarsSpecTest.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ public function testSpecs(array $spec): void
109109
|| $spec['description'] === 'helpers - the lookupProperty-option'
110110

111111
// need confirm
112-
|| $spec['it'] === 'GH-1135 : Context handling within each iteration'
113112
|| $spec['it'] === "bug reported by @fat where lambdas weren't being properly resolved"
114113
|| $spec['it'] === 'if with function argument'
115114
|| $spec['it'] === 'with with function argument'

0 commit comments

Comments
 (0)