Graceful fallback for getRangesSnapshot() GitOrigin-RevId: 2f0e70dbcdd38de87d0b1c7590f7d8a5a7112937
@@ -73,7 +73,11 @@ async function getRangesSnapshot(projectId, version, pathname) {
})
}
if (!file.isEditable()) {
- throw new Error('File is not editable')
+ // A binary file has no tracked changes or comments
+ return {
+ changes: [],
+ comments: [],
+ }
const historyId = await WebApiManager.promises.getHistoryId(projectId)
await file.load('eager', HistoryStoreManager.getBlobStore(historyId))