diff --git a/pages/components/DiscordStatus.js b/pages/components/DiscordStatus.js index 79bb2c0..5c660a0 100644 --- a/pages/components/DiscordStatus.js +++ b/pages/components/DiscordStatus.js @@ -12,21 +12,27 @@ const App = () => { }; fetchData(); }, []); - const status = data.members && data.members[0].status; + const str = JSON.stringify(data) + const status = 0 + if (str.indexOf("status") !== -1){ + status = data.members && data.members[0].status; + } return ( <>