Skip to content

Commit 12b5fee

Browse files
Fix for default values
1 parent c2583cd commit 12b5fee

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/components/ChannelList/ChannelList.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ import { ChatContext } from '../../context';
2424
*
2525
* @example ../docs/ChannelList.md
2626
*/
27+
const DEFAULT_FILTERS = {};
28+
const DEFAULT_OPTIONS = {};
29+
const DEFAULT_SORT = {};
30+
2731
const ChannelList = (props) => {
2832
const {
2933
List = ChannelListMessenger,
30-
filters = {},
34+
filters = DEFAULT_FILTERS,
3135
lockChannelOrder = false,
3236
onAddedToChannel,
3337
onChannelDeleted,
@@ -37,9 +41,9 @@ const ChannelList = (props) => {
3741
onMessageNew,
3842
onRemovedFromChannel,
3943
onSelect,
40-
options = {},
44+
options = DEFAULT_OPTIONS,
4145
setFlatListRef,
42-
sort = {},
46+
sort = DEFAULT_SORT,
4347
} = props;
4448

4549
const { client } = useContext(ChatContext);

0 commit comments

Comments
 (0)