mirror of
https://github.com/Wolvan/poll.horse.git
synced 2024-11-22 04:58:00 +01:00
Fix votes from breaking server side rendering
This commit is contained in:
parent
0545d90c3f
commit
7887fa360b
2 changed files with 2 additions and 2 deletions
|
@ -35,7 +35,7 @@ function domLoaded() {
|
|||
};
|
||||
|
||||
try {
|
||||
drawChart(JSON.parse(POLL_VOTE_DATA_STRING));
|
||||
drawChart(JSON.parse(window.atob(POLL_VOTE_DATA_STRING)));
|
||||
} catch (error) {
|
||||
// eh
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ export default function init(router: Router): void {
|
|||
"POLL_OPTION_DIVS": pollOptionsDivs,
|
||||
"POLL_VOTES_TOTAL": totalVotes,
|
||||
"BACKEND_BASE_PATH": (program.opts().backendBaseUrl || ""),
|
||||
"POLL_OPTION_VOTES": JSON.stringify(Object.entries(poll.votes))
|
||||
"POLL_OPTION_VOTES": Buffer.from(JSON.stringify(Object.entries(poll.votes))).toString("base64")
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
|
Loading…
Reference in a new issue