| 2335 | setTimeout(() => this.activatePoll?.(forceShowPoll), delay) |
| 2336 | } |
| 2337 | const onPollError = (poll, response, request) => { |
| 2338 | if (response.status === 404) { |
| 2339 | console.log('There are no more polls left.') |
| 2340 | } else { |
| 2341 | console.error("Couldn't load poll:", response.status, response.statusText) |
| 2342 | } |
| 2343 | if (this.poll) { |
| 2344 | delete this.poll |
| 2345 | } |
| 2346 | } |
| 2347 | this.listenToOnce(tempLoadingPoll, 'sync', onPollSync) |
| 2348 | this.listenToOnce(tempLoadingPoll, 'error', onPollError) |
| 2349 | tempLoadingPoll = this.supermodel.loadModel(tempLoadingPoll, null, 0).model |