Skip to content

Commit

Permalink
fix: fix announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
zmh-program committed Mar 8, 2024
1 parent 870b7e3 commit 70aadd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/conf/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ export function setAnnouncement(announcement: string): void {
/**
* set the announcement in localStorage
*/
if (!announcement || announcement.trim() === "") return;

const firstReceived = getMemory("announcement") !== announcement;
setMemory("announcement", announcement);

Expand Down
2 changes: 1 addition & 1 deletion app/src/store/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ export function useWorking(): boolean {

export const updateMasks = async (dispatch: AppDispatch) => {
const resp = await listMasks();
resp.data.length > 0 && dispatch(setCustomMasks(resp.data));
resp.data && resp.data.length > 0 && dispatch(setCustomMasks(resp.data));

return resp;
};
Expand Down

0 comments on commit 70aadd5

Please sign in to comment.