Skip to content

Commit 83c0c5d

Browse files
Merge pull request #266 from laravel/script-fixes
Translation script fixes
2 parents 8e268a3 + 0b85b82 commit 83c0c5d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to the Laravel extension will be documented in this file.
44

55
## [Unreleased]
66

7-
- Nothing yet
7+
- Additional Livewire, Volt, and Blade support ([#261](https://github.com/laravel/vs-code-extension/pull/261))
88

99
## [0.1.20]
1010

php-templates/translations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ protected function linesFromJsonFile($file)
111111

112112
foreach ($encoded as $index => $keys) {
113113
// Pretty likely the be on the line that is the index, go happy path first
114-
if (strpos($lines[$index + 1], $keys[0]) !== false) {
114+
if (strpos($lines[$index + 1] ?? '', $keys[0]) !== false) {
115115
$result[$keys[1]] = $index + 2;
116116
continue;
117117
}

src/templates/translations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ $translator = new class
111111
112112
foreach ($encoded as $index => $keys) {
113113
// Pretty likely the be on the line that is the index, go happy path first
114-
if (strpos($lines[$index + 1], $keys[0]) !== false) {
114+
if (strpos($lines[$index + 1] ?? '', $keys[0]) !== false) {
115115
$result[$keys[1]] = $index + 2;
116116
continue;
117117
}

0 commit comments

Comments
 (0)