Skip to content

Commit 5a0b41e

Browse files
authored
Merge pull request #282 from garyadaptive/fix/get-current-channel-return-type
Support nullable return type for getCurrentChannel
2 parents 7390f10 + 7d91e04 commit 5a0b41e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/api/DesktopAgent.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,5 @@ export interface DesktopAgent {
169169
*
170170
* Returns `null` if the app is not joined to a channel.
171171
*/
172-
getCurrentChannel(): Promise<Channel>;
172+
getCurrentChannel(): Promise<Channel | null>;
173173
}

src/api/methods.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ export const getOrCreateChannel: (
7171
return window.fdc3.getOrCreateChannel(channelId);
7272
};
7373

74-
export const getCurrentChannel: () => Promise<Channel> = () => {
74+
export const getCurrentChannel: () => Promise<Channel | null> = () => {
7575
return window.fdc3.getCurrentChannel();
7676
};

0 commit comments

Comments
 (0)