Skip to content

Commit

Permalink
Merge pull request #34 from sumitjain236/main
Browse files Browse the repository at this point in the history
fix: support for single doctype
  • Loading branch information
nikkothari22 authored Jun 27, 2023
2 parents 2adc098 + e484506 commit 6e0a99d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frappe-js-sdk",
"version": "1.3.0",
"version": "1.3.1",
"description": "TypeScript/JavaScript client for Frappe Framework REST API",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -40,4 +40,4 @@
"peerDependencies": {
"axios": "^0.26.1"
}
}
}
2 changes: 1 addition & 1 deletion src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class FrappeDB {
* @param {string} docname Name of the document
* @returns Promise which resolves to the document object
*/
async getDoc<T = any>(doctype: string, docname?: string | null): Promise<FrappeDoc<T>> {
async getDoc<T = any>(doctype: string, docname: string = ''): Promise<FrappeDoc<T>> {
return this.axios
.get(`/api/resource/${doctype}/${docname}`)
.then((res) => res.data.data)
Expand Down

0 comments on commit 6e0a99d

Please sign in to comment.