Ignore errors in getContentOfType

d7a37298aba156a8ebed7848b634cd2cdaa99379

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -0Showing whitespace changes
src/endpoints/content-manager.js+4 -0
@@ -232,6 +232,7 @@ function getContentOfType(type, format) {
232 if (!item.folder) {232 if (!item.folder) {
233 continue;233 continue;
234 }234 }
235 try {
235 const filePath = path.join(item.folder, item.filename);236 const filePath = path.join(item.folder, item.filename);
236 const fileContent = fs.readFileSync(filePath);237 const fileContent = fs.readFileSync(filePath);
237 switch (format) {238 switch (format) {
@@ -245,6 +246,9 @@ function getContentOfType(type, format) {
245 files.push(fileContent);246 files.push(fileContent);
246 break;247 break;
247 }248 }
249 } catch {
250 // Ignore errors
251 }
248 }252 }
249 return files;253 return files;
250}254}