Skip to content

Commit

Permalink
fix: checking for lock field when parsing xml entries (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergi0 authored and JohnstonCode committed Oct 28, 2019
1 parent b67844d commit 5cb1413
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export interface IEntry {
reposStatus?: {
props: string;
item: string;
lock?: object;
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/statusParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function processEntry(
}

const wcStatus: IWcStatus = {
locked: !!entry.wcStatus.wcLocked && entry.wcStatus.wcLocked === "true",
locked: !!entry.wcStatus.wcLocked && entry.wcStatus.wcLocked === "true" || !!(entry.reposStatus && entry.reposStatus.lock),
switched: !!entry.wcStatus.switched && entry.wcStatus.switched === "true"
};

Expand Down

0 comments on commit 5cb1413

Please sign in to comment.