Hide vote on close
This commit is contained in:
parent
7b0ddf25d5
commit
761a9f636d
@ -411,9 +411,11 @@
|
|||||||
const activeVote = firebase.functions().httpsCallable('activeVote');
|
const activeVote = firebase.functions().httpsCallable('activeVote');
|
||||||
function updateVote() {
|
function updateVote() {
|
||||||
activeVote().then((data) => {
|
activeVote().then((data) => {
|
||||||
if (data && data.data) {
|
if (data) {
|
||||||
console.log(activeVoteData, data);
|
if (!data.data) {
|
||||||
if (!activeVoteData || activeVoteData.voteId !== data.data.voteId) {
|
activeVoteData = undefined;
|
||||||
|
updateVoteUI(true);
|
||||||
|
} else if (!activeVoteData || activeVoteData.voteId !== data.data.voteId) {
|
||||||
activeVoteData = data.data;
|
activeVoteData = data.data;
|
||||||
console.log("Full update");
|
console.log("Full update");
|
||||||
updateVoteUI(true);
|
updateVoteUI(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user