Skip to content

Commit 2a62441

Browse files
committed
Bug fix for empty TypeScript files.
1 parent 0e2cdde commit 2a62441

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Helper/TypeScript/TypeScriptMarkHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public static function appendHashToLines(array $lines): array
2222
$hash = md5(implode(PHP_EOL, $lines));
2323
$mark = self::getMarkMd5();
2424

25-
if (!str_starts_with(end($lines), '//'))
25+
if (empty($lines) || !str_starts_with(end($lines), '//'))
2626
{
2727
$lines[] = '';
2828
}

0 commit comments

Comments
 (0)