Open ExcitedSpider opened 1 year ago
I reckon this issue is related to the implementation of components/Form/promisify.ts
which implemented first default function parameter wrongly.
function promisify<T = any>(fn: (...args: any[]) => any): () => Promise<T> {
return Object.defineProperty(
function (...args: any[]) {
if (typeof args[args.length - 1] === 'function') fn.apply(this, args);
else {
return new Promise((resolve, reject) => {
args[args.length] = (err, res) => {
if (err) return reject(new ValidateError(err));
resolve(res);
};
args.length++;
fn.apply(this, args);
});
}
},
'name',
{ value: fn.name }
);
}
Basic Info
Steps to reproduce