Skip to content

Commit

Permalink
#945: only initialize prettier config if we actually plan on saving f…
Browse files Browse the repository at this point in the history
…iles - not for caching
  • Loading branch information
JoernBerkefeld committed May 30, 2023
1 parent 7493647 commit 575554d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/metadataTypes/Asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ class Asset extends MetadataType {
static async retrieve(retrieveDir, _, subTypeArr, key) {
const items = [];
subTypeArr ||= this._getSubTypes();
await File.initPrettier();
if (retrieveDir) {
await File.initPrettier();
}
// loop through subtypes and return results of each subType for caching (saving is handled per subtype)
for (const subType of subTypeArr) {
// each subtype contains multiple different specific types (images contains jpg and png for example)
Expand Down

0 comments on commit 575554d

Please sign in to comment.