mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-03-26 23:06:45 +01:00
Fixed tasks buttons by replacing the error with a warning when setting properties to undefined. (#618)
This commit is contained in:
parent
ef90832aea
commit
7984327d81
@ -806,6 +806,11 @@
|
||||
continue
|
||||
}
|
||||
if (key in TASK_OPTIONAL) {
|
||||
if (typeof this._reqBody[key] == "undefined") {
|
||||
delete this._reqBody[key]
|
||||
console.warn(`reqBody[${key}] was set to undefined. Removing optional key without value...`)
|
||||
continue
|
||||
}
|
||||
if (typeof this._reqBody[key] !== TASK_OPTIONAL[key]) {
|
||||
throw new Error(`${key} need to be of type ${TASK_OPTIONAL[key]} but ${typeof this._reqBody[key]} was found.`)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user