We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59a2e85 commit aea5991Copy full SHA for aea5991
lib/entity.js
@@ -317,10 +317,10 @@ function isAsset (data) {
317
}
318
319
export function cleanAssets (data) {
320
- if (data && typeof data === "object" && Object.keys(data).length > 0) {
+ if (data && typeof data === "object") {
321
const keys = Object.keys(data);
322
for (const key of keys) {
323
- if (typeof data[key] === "object" && Object.keys(data[key]).length > 0) {
+ if (data[key] !== null && data[key] !== undefined && typeof data[key] === "object") {
324
if (isAsset(data[key])) {
325
data[key] = (Array.isArray(data[key])) ? data[key].map(element => element.uid) : data[key].uid;
326
} else {
0 commit comments