(Bugfix undefined id) Use file sha as id
This commit is contained in:
parent
cc60dc9aa9
commit
8e2fefc3f7
@ -138,7 +138,7 @@ export default class GitHub {
|
||||
const repo = this.repo || this.getRepoFromResponseUrl(response.url);
|
||||
const { value, size, path, fileObj } = mediaFile;
|
||||
const url = `https://raw.githubusercontent.com/${repo}/${this.branch}${path}`;
|
||||
return { id: response.sha, name: value, size: fileObj.size, url, path: trimStart(path, '/') };
|
||||
return { id: mediaFile.sha, name: value, size: fileObj.size, url, path: trimStart(path, '/') };
|
||||
}
|
||||
catch(error) {
|
||||
console.error(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user