Skip to content

Commit a37205d

Browse files
author
Dan Carbonell
committed
fix tests
1 parent af19ac6 commit a37205d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Channel/Channel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ const Channel = (props) => {
195195
const initChannel = async () => {
196196
let initError = false;
197197

198-
if (!channel.initialized) {
198+
if (!channel.initialized && channel.cid) {
199199
try {
200200
await channel.watch();
201201
} catch (e) {

src/components/Channel/__tests__/Channel.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('Channel', () => {
7676
cleanup();
7777
});
7878

79-
it('should render simple text if the channel prop is not provided', async () => {
79+
it('should render a simple text error if the channel id does not exist', async () => {
8080
const nullChannel = { ...channel, cid: null };
8181
const { getByTestId } = renderComponent({ channel: nullChannel });
8282

0 commit comments

Comments
 (0)