Browse Source

fix normalizeEntity method on null value

Olivier Massot 2 năm trước cách đây
mục cha
commit
a2b5eb041a
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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
       }
     }