We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3d8e26 commit a311240Copy full SHA for a311240
nx/blocks/media-scanner/utils/utils.js
@@ -425,7 +425,15 @@ export async function loadMediaJson(org, repo) {
425
const jsonData = await resp.json();
426
lastMediaJsonModified = new Date().toISOString();
427
428
- return jsonData;
+ if (Array.isArray(jsonData)) {
429
+ return jsonData;
430
+ }
431
+
432
+ if (jsonData && jsonData.data && Array.isArray(jsonData.data)) {
433
+ return jsonData.data;
434
435
436
+ return [];
437
}
438
439
async function saveToJson(data, filename) {
0 commit comments