fix(backend-bitbucket): fix media library not loaded on BitBucket (#3059)

This commit is contained in:
Erez Rokah
2020-01-09 12:03:53 +02:00
committed by GitHub
parent 9fc661e00d
commit 8849c0ea57

View File

@ -114,7 +114,7 @@ export default class API {
}; };
}; };
listFiles = async (path, depth) => { listFiles = async (path, depth = 1) => {
const node = await this.branchCommitSha(); const node = await this.branchCommitSha();
const { entries, cursor } = await flow([ const { entries, cursor } = await flow([
// sort files by filename ascending // sort files by filename ascending
@ -135,7 +135,7 @@ export default class API {
})), })),
])(cursor.data.getIn(['links', action])); ])(cursor.data.getIn(['links', action]));
listAllFiles = async (path, depth) => { listAllFiles = async (path, depth = 1) => {
const { cursor: initialCursor, entries: initialEntries } = await this.listFiles(path, depth); const { cursor: initialCursor, entries: initialEntries } = await this.listFiles(path, depth);
const entries = [...initialEntries]; const entries = [...initialEntries];
let currentCursor = initialCursor; let currentCursor = initialCursor;