Switch _.isFunction usage to native versions

Change-type: patch
This commit is contained in:
Pagan Gazzard 2023-10-13 15:17:17 +01:00 committed by Felipe Lalanne
parent 3bfdc4454e
commit c9f032e13a

View File

@ -203,7 +203,7 @@ type Prototype = { [key: string]: any };
function clonePrototype(prototype: Prototype): Prototype {
const clone: Prototype = {};
Object.getOwnPropertyNames(prototype).forEach((fn) => {
if (fn !== 'constructor' && _.isFunction(prototype[fn])) {
if (fn !== 'constructor' && typeof prototype[fn] === 'function') {
clone[fn] = prototype[fn];
}
});