mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Drop fields
This commit is contained in:
@@ -11,7 +11,13 @@ export const buildHighlightConfig = (globalConfig, widgetConfig) => {
|
||||
...(widgetConfig?.levels || {}),
|
||||
};
|
||||
|
||||
const fields = widgetConfig?.fields || {};
|
||||
const { levels: _levels, ...fields } = widgetConfig || {};
|
||||
|
||||
Object.keys(fields).forEach((key) => {
|
||||
if (fields[key] === null || fields[key] === undefined) {
|
||||
delete fields[key];
|
||||
}
|
||||
});
|
||||
|
||||
const hasLevels = Object.values(levels).some(Boolean);
|
||||
const hasFields = Object.keys(fields).length > 0;
|
||||
|
||||
Reference in New Issue
Block a user