Skip to content

Commit

Permalink
Fix proposal crash (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Duddino authored Mar 31, 2023
1 parent 9769df5 commit 9fd4c2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ function renderProposals(arrProposals, fContested) {

if (!fContested) {
const localProposals = JSON.parse(
localStorage.getItem('localProposals')
localStorage.getItem('localProposals') || '[]'
).map((p) => {
return {
Name: p.name,
Expand All @@ -1231,7 +1231,9 @@ function renderProposals(arrProposals, fContested) {
// IMPORTANT: Sanitise all of our HTML or a rogue server or malicious proposal could perform a cross-site scripting attack
domNameAndURL.innerHTML = `<a class="active" href="${sanitizeHTML(
cProposal.URL
)}" target="_blank" rel="noopener noreferrer"><b>${sanitizeHTML(cProposal.Name)}</b></a>`;
)}" target="_blank" rel="noopener noreferrer"><b>${sanitizeHTML(
cProposal.Name
)}</b></a>`;

// Payment Schedule and Amounts
const domPayments = domRow.insertCell();
Expand Down

0 comments on commit 9fd4c2e

Please sign in to comment.