Explorar o código

fix normalizeEntity method on null value

Olivier Massot %!s(int64=2) %!d(string=hai) anos
pai
achega
a2b5eb041a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      services/data/normalizer/hydraNormalizer.ts

+ 1 - 1
services/data/normalizer/hydraNormalizer.ts

@@ -27,7 +27,7 @@ class HydraNormalizer {
           return UrlUtils.makeIRI(targetEntity, id)
         })
       } else {
-        entity[field] = UrlUtils.makeIRI(targetEntity, value)
+        entity[field] = value !== null ? UrlUtils.makeIRI(targetEntity, value) : null
       }
     }