elections-types 1.0.59 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ export class Candidate {
63
63
  this.ballotpedia_name = candidate.ballotpedia_name;
64
64
  this.ballotpedia_url = candidate.ballotpedia_url;
65
65
  this.ballotpedia_data = candidate.ballotpedia_data;
66
- this.activity_index = new ActivityIndex(candidate.activity_index);
66
+ this.activity_index = candidate.activity_index !== undefined ? new ActivityIndex(candidate.activity_index) : undefined;
67
67
  }
68
68
  static is(candidate) {
69
69
  return (candidate !== undefined &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "elections-types",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "directories": {
@@ -74,7 +74,7 @@ export class Candidate {
74
74
  this.ballotpedia_name = candidate.ballotpedia_name
75
75
  this.ballotpedia_url = candidate.ballotpedia_url
76
76
  this.ballotpedia_data = candidate.ballotpedia_data
77
- this.activity_index = new ActivityIndex(candidate.activity_index)
77
+ this.activity_index = candidate.activity_index !== undefined ? new ActivityIndex(candidate.activity_index) : undefined
78
78
  }
79
79
 
80
80
  static is(candidate : any) : candidate is Candidate {