Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 18, 2024
1 parent ca91cc4 commit fe97849
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SaveStoryButton/SaveStoryButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function SaveStoryButton({ storyId }: SaveStoryButtonProps) {
useEffect(() => {
// if another card updates this story, update it here also
if (typeof channels[storyId] !== 'undefined') {
setStoryIsSaved(channels[storyId]);
setStoryIsSaved(channels[storyId] ?? false);
}
}, [channels[storyId]]);

Expand Down
2 changes: 1 addition & 1 deletion src/utils/PubSubContext.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createContext, useContext, useMemo, useState } from 'react';

export interface PubSubState {
channels: Record<number, boolean>;
channels: Record<number, boolean | undefined>;
initializeChannel: (id: number) => void;
publish: (id: number, message: boolean) => void;
}
Expand Down

0 comments on commit fe97849

Please sign in to comment.