mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Add comments pointing to github issue
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user