Skip to content

Commit

Permalink
Fixes problem loading a resource, added a guard clause to allow loadi…
Browse files Browse the repository at this point in the history
…ng the RDF
  • Loading branch information
jermnelson committed Oct 13, 2020
1 parent af49ce4 commit e42fcd8
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 e42fcd8

Please sign in to comment.