Skip to content

Commit

Permalink
fix(build): catch promise
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoronex committed Nov 17, 2024
1 parent dd5a7fe commit 35807f7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/handlers/room-responsible-legacy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ export default function RoomResponsibleLegacyView() {
const [url, setUrl] = useState('');

useEffect(() => {
getRoomResponsibleLegacyUrl().then((res) => {
if (res && res.data) setUrl(res.data);
});
getRoomResponsibleLegacyUrl()
.then((res) => {
if (res && res.data) setUrl(res.data);
})
.catch((e) => console.error(e));
}, []);

if (!url) {
Expand Down

0 comments on commit 35807f7

Please sign in to comment.