mirror of
https://github.com/SukkaW/Surge.git
synced 2025-12-13 01:30:37 +08:00
Fix: fileEqual handling w/ empty line
This commit is contained in:
parent
96cf0fc1f9
commit
5dd476cc48
@ -398,6 +398,15 @@ export async function fileEqual(linesA: string[], source: AsyncIterable<string>
|
|||||||
|
|
||||||
const lineA = linesA[index];
|
const lineA = linesA[index];
|
||||||
|
|
||||||
|
if (lineA.length === 0 && lineB.length === 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// not both line are empty
|
||||||
|
if (lineA.length === 0 || lineB.length === 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const firstCharA = lineA.charCodeAt(0);
|
const firstCharA = lineA.charCodeAt(0);
|
||||||
const firstCharB = lineB.charCodeAt(0);
|
const firstCharB = lineB.charCodeAt(0);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user