observal-pi 1.3.1 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/observal.ts +4 -2
- package/package.json +1 -1
package/extensions/observal.ts
CHANGED
|
@@ -201,8 +201,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
201
201
|
let consumedBytes = 0;
|
|
202
202
|
for (let i = 0; i < rawLines.length; i++) {
|
|
203
203
|
const line = rawLines[i]!;
|
|
204
|
-
if (i === rawLines.length - 1
|
|
205
|
-
|
|
204
|
+
if (i === rawLines.length - 1) {
|
|
205
|
+
// Last element after split: either empty (file ended with \n)
|
|
206
|
+
// or an incomplete line (file didn't end with \n). Either way, stop.
|
|
207
|
+
break;
|
|
206
208
|
}
|
|
207
209
|
if (line.trim()) {
|
|
208
210
|
lines.push(line);
|