Skip to content

Commit b750f27

Browse files
committed
Fix Api#getApplication
1 parent f5e9ae6 commit b750f27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ export class SquareCloudAPI {
4646
async getApplication(appId: string): Promise<Application> {
4747
validateString(appId, 'APP_ID');
4848

49-
const { applications } = await this.apiManager.user();
49+
const userData = await this.apiManager.user();
50+
const applications = userData.applications || [];
51+
5052
const appData = applications.find((app) => app.id === appId);
5153

5254
if (!appData) {

0 commit comments

Comments
 (0)