Skip to content

Commit

Permalink
Process array of assets for JSON-LD (#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlackty authored and devongovett committed Dec 18, 2018
1 parent e8bc71e commit 3e1c5a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -21,7 +21,7 @@
"width": 180,
"height": 120
},
"image": "images/image.jpeg"
"image": ["images/image.jpeg", "images/image.jpeg"]
}
</script>

Expand Down
4 changes: 4 additions & 0 deletions packages/core/parcel-bundler/src/assets/JSONLDAsset.js
Expand Up @@ -59,6 +59,10 @@ class JSONLDAsset extends Asset {
assetPath = urlJoin(this.options.publicURL, assetPath);
}
schema[schemaKey] = assetPath;
} else if (Array.isArray(schema[schemaKey])) {
Object.keys(schema[schemaKey]).forEach(i => {
this.collectFromKey(schema[schemaKey], i);
});
} else {
this.collectFromKey(schema[schemaKey], 'url');
}
Expand Down

0 comments on commit 3e1c5a3

Please sign in to comment.