check prototype

This commit is contained in:
srgooglo 2023-01-27 00:05:33 +01:00
parent 9117ca3cb1
commit 18ef646b3b

View File

@ -60,7 +60,7 @@ module.exports = class Controller {
this.customHandler = objEndpoint.customHandler this.customHandler = objEndpoint.customHandler
} }
} }
} else if (typeof endpoint === "function" && typeof endpoint.prototype.constructor === "undefined") { } else if (typeof endpoint === "function" && typeof endpoint.prototype?.constructor === "undefined") {
// Handle endpoint transformation as a function // Handle endpoint transformation as a function
const endpointFn = endpoint const endpointFn = endpoint