Skip to content

Commit 5cb1413

Browse files
Sergi0JohnstonCode
authored andcommitted
fix: checking for lock field when parsing xml entries (#693)
1 parent b67844d commit 5cb1413

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/common/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ export interface IEntry {
161161
reposStatus?: {
162162
props: string;
163163
item: string;
164+
lock?: object;
164165
};
165166
}
166167

src/statusParser.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function processEntry(
1818
}
1919

2020
const wcStatus: IWcStatus = {
21-
locked: !!entry.wcStatus.wcLocked && entry.wcStatus.wcLocked === "true",
21+
locked: !!entry.wcStatus.wcLocked && entry.wcStatus.wcLocked === "true" || !!(entry.reposStatus && entry.reposStatus.lock),
2222
switched: !!entry.wcStatus.switched && entry.wcStatus.switched === "true"
2323
};
2424

0 commit comments

Comments
 (0)