mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add comments pointing to github issue
This commit is contained in:
parent
b8d252244c
commit
4f1168a590
2 changed files with 6 additions and 0 deletions
|
@ -97,6 +97,9 @@ public class SnapshotApiFacade {
|
|||
= api.getSavedVers(oauth2, projectName);
|
||||
GetDocResult latestDoc = SnapshotApi.getResult(getDoc);
|
||||
int latest = latestDoc.getVersionID();
|
||||
// Handle edge-case for projects with no changes, that were imported
|
||||
// to v2. In which case both `latest` and `version` will be zero.
|
||||
// See: https://github.com/overleaf/writelatex-git-bridge/pull/50
|
||||
if (latest > version || (latest == 0 && version == 0)) {
|
||||
for (
|
||||
SnapshotInfo snapshotInfo :
|
||||
|
|
|
@ -98,6 +98,9 @@ public class GetDocResult extends Result {
|
|||
}
|
||||
} else {
|
||||
versionID = jsonObject.get("latestVerId").getAsInt();
|
||||
// Handle edge-case for projects with no changes, that were imported
|
||||
// to v2. In which case `latestVerAt` will not be present.
|
||||
// See: https://github.com/overleaf/writelatex-git-bridge/pull/50
|
||||
if (jsonObject.has("latestVerAt")) {
|
||||
createdAt = jsonObject.get("latestVerAt").getAsString();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue