Skip to content

Commit

Permalink
remove trailing slash
Browse files Browse the repository at this point in the history
  • Loading branch information
tylim88 committed Apr 15, 2024
1 parent d32afde commit ec3e2f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firelordjs",
"version": "2.8.10",
"version": "2.8.15",
"description": "馃敟 High Precision Typescript Wrapper for Firestore Web, Providing Unparalleled Type Safe and Dev Experience",
"author": "tylim",
"license": "MIT",
Expand Down
10 changes: 6 additions & 4 deletions src/refs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ export const buildPathFromColIDsAndDocIDs = ({
collectionIDs: string[]
documentIDs: string[]
}) => {
return collectionIDs.reduce((acc, collectionId, index) => {
const documentID = documentIDs[index] ? `${documentIDs[index]}/` : ''
return `${acc}${collectionId}/${documentID}`
}, '')
return collectionIDs
.reduce((acc, collectionId, index) => {
const documentID = documentIDs[index] ? `${documentIDs[index]}/` : ''
return `${acc}${collectionId}/${documentID}`
}, '')
.slice(0, -1)
}

export const queryBuilder = (
Expand Down

0 comments on commit ec3e2f2

Please sign in to comment.