fix proposal content is nill
This commit is contained in:
parent
fa83df53de
commit
99cb79e0cd
@ -23,10 +23,6 @@ export default class Proposal {
|
||||
|
||||
this.id = element.proposal_id || element.id
|
||||
this.status = element.status
|
||||
this.type = element.content.type
|
||||
if (element.content['@type']) {
|
||||
this.type = element.content['@type']
|
||||
}
|
||||
this.tally = new ProposalTally().init(element.final_tally_result, total)
|
||||
this.submit_time = element.submit_time
|
||||
this.voting_end_time = element.voting_end_time
|
||||
@ -37,6 +33,10 @@ export default class Proposal {
|
||||
if (this.contents) {
|
||||
this.title = this.contents.title
|
||||
this.description = this.contents.description
|
||||
this.type = element.content.type
|
||||
if (element.content['@type']) {
|
||||
this.type = element.content['@type']
|
||||
}
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user