Browse Source

Error: cannot read property 'analyticUnitId' of undefined #378 (#379)

pull/1/head
rozetko 6 years ago committed by GitHub
parent
commit
04ee5e2c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      server/src/models/segment_model.ts

3
server/src/models/segment_model.ts

@ -96,6 +96,9 @@ export async function findMany(id: AnalyticUnitId, query: FindManyQuery): Promis
} }
export async function insertSegments(segments: Segment[]) { export async function insertSegments(segments: Segment[]) {
if(_.isEmpty(segments)) {
return;
}
let analyticUnitId: AnalyticUnitId = segments[0].analyticUnitId; let analyticUnitId: AnalyticUnitId = segments[0].analyticUnitId;
let segmentIdsToRemove: SegmentId[] = []; let segmentIdsToRemove: SegmentId[] = [];
let segmentsToInsert: Segment[] = []; let segmentsToInsert: Segment[] = [];

Loading…
Cancel
Save