diff --git a/context7.json b/context7.json new file mode 100644 index 000000000000..3a0b7c321b31 --- /dev/null +++ b/context7.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://context7.com/schema/context7.json", + "projectTitle": "CIPP - Cyberdrain Improved Partner Portal", + "description": "The CyberDrain Improved Partner Portal is a portal to help manage administration for Microsoft Partners.", + "folders": [], + "excludeFolders": [], + "excludeFiles": [], + "rules": [], + "previousVersions": [], + "branch": "docs" +} diff --git a/public/version.json b/public/version.json index f9d9abd8b211..a809230b8095 100644 --- a/public/version.json +++ b/public/version.json @@ -1,3 +1,3 @@ { - "version": "8.4.0" + "version": "8.4.1" } diff --git a/src/components/CippTable/util-columnsFromAPI.js b/src/components/CippTable/util-columnsFromAPI.js index 407268873538..8d93ccc19c18 100644 --- a/src/components/CippTable/util-columnsFromAPI.js +++ b/src/components/CippTable/util-columnsFromAPI.js @@ -40,6 +40,10 @@ const getAtPath = (obj, path) => { const mergeKeys = (dataArray) => { return dataArray.reduce((acc, item) => { const mergeRecursive = (obj, base = {}) => { + // Add null/undefined check before calling Object.keys + if (!obj || typeof obj !== 'object') { + return base; + } Object.keys(obj).forEach((key) => { if ( typeof obj[key] === "object" && @@ -62,11 +66,20 @@ const mergeKeys = (dataArray) => { return base; }; + // Add null/undefined check before calling mergeRecursive + if (!item || typeof item !== 'object') { + return acc; + } return mergeRecursive(item, acc); }, {}); }; export const utilColumnsFromAPI = (dataArray) => { + // Add safety check for dataArray + if (!dataArray || !Array.isArray(dataArray) || dataArray.length === 0) { + return []; + } + const dataSample = mergeKeys(dataArray); const generateColumns = (obj, parentKey = "") => {