mirror of
https://github.com/status-im/visual-identity.git
synced 2025-02-08 10:44:33 +00:00
add bypass getPolls when no polls
This commit is contained in:
parent
f83aa448c4
commit
227c01e853
@ -40,7 +40,9 @@ class App extends React.Component {
|
||||
const { nPolls, poll } = PollManager.methods;
|
||||
const polls = await nPolls.call();
|
||||
const total = await polls.call();
|
||||
getPolls(total, poll).then(rawPolls => { this.setState({ rawPolls })});
|
||||
console.log('total', total, polls);
|
||||
if (total) getPolls(total, poll).then(rawPolls => { this.setState({ rawPolls })});
|
||||
else this.setState({ rawPolls: [] });
|
||||
}
|
||||
|
||||
_renderStatus(title, available) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user