Skip to content

Commit

Permalink
Merge pull request #40 from biothings/add-tests
Browse files Browse the repository at this point in the history
Additional mock for adding tests
  • Loading branch information
tokebe authored Oct 21, 2022
2 parents 2946040 + 1945c4e commit a0bb116
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ export class Record {
// for user-made records lacking qXEdge
protected makeFakeQXEdge(record: FrozenRecord | VerboseFrozenRecord | MinimalFrozenRecord): QXEdge {
return {
getID(): string {
return 'fakeEdge';
},
getSubject(): QNode {
return {
getID(): string {
Expand Down Expand Up @@ -443,7 +446,7 @@ export class Record {
protected get _configuredEdgeAttributesForHash(): string {
return this._getFlattenedEdgeAttributes(this.mappedResponse["edge-attributes"])
.filter(attribute => {
return this.config.EDGE_ATTRIBUTES_USED_IN_RECORD_HASH.includes(attribute.attribute_type_id);
return this.config?.EDGE_ATTRIBUTES_USED_IN_RECORD_HASH?.includes(attribute.attribute_type_id);
})
.reduce((acc, attribute) => {
return [...acc, `${attribute.attribute_type_id}:${attribute.value}`];
Expand Down

0 comments on commit a0bb116

Please sign in to comment.