mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 21:59:50 +01:00
fixes for widget validation
This commit is contained in:
@@ -9,9 +9,9 @@ export default function validateWidgetData(widget, endpoint, data) {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if (dataParsed) {
|
||||
if (dataParsed && Object.entries(dataParsed).length) {
|
||||
const validate = widgets[widget.type]?.mappings?.[endpoint]?.validate;
|
||||
validate.forEach(key => {
|
||||
validate?.forEach(key => {
|
||||
if (dataParsed[key] === undefined) {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user