Order document structure alphabetically

This commit is contained in:
Jori Lallo
2018-02-06 23:26:14 -08:00
parent 5588897271
commit b47771c56f
4 changed files with 25 additions and 8 deletions

View File

@ -147,6 +147,8 @@ Collection.prototype.addDocumentToStructure = async function(
};
if (!document.parentDocumentId) {
// Note: Index is supported on DB level but it's being ignored
// by the API presentation until we build product support for it.
this.documentStructure.splice(
index !== undefined ? index : this.documentStructure.length,
0,