Skip to content

Commit

Permalink
Merge pull request #2685 from LD4P/t2681-open-resource
Browse files Browse the repository at this point in the history
Checks for null value in resourceHelpers
  • Loading branch information
jermnelson authored Oct 13, 2020
2 parents 8a3ab30 + e42fcd8 commit a5e389c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/actionCreators/resourceHelpers.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright 2020 Stanford University see LICENSE for license

import rdf from 'rdf-ext'
import shortid from 'shortid'
import _ from 'lodash'
Expand Down Expand Up @@ -158,6 +160,7 @@ const mergeValues = (valuesFromTemplates, valuesFromObjs) => {
const valuesMapFor = (values) => {
const valuesMap = {}
values.forEach((value) => {
if (_.isEmpty(value)) return
const subjectTemplateKey = value.valueSubject.subjectTemplate.key
if (!valuesMap[subjectTemplateKey]) valuesMap[subjectTemplateKey] = []
valuesMap[subjectTemplateKey].push(value)
Expand Down

0 comments on commit a5e389c

Please sign in to comment.