mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-01 23:30:48 +00:00
Switch _.isFunction usage to native versions
Change-type: patch
This commit is contained in:
parent
3bfdc4454e
commit
c9f032e13a
@ -203,7 +203,7 @@ type Prototype = { [key: string]: any };
|
|||||||
function clonePrototype(prototype: Prototype): Prototype {
|
function clonePrototype(prototype: Prototype): Prototype {
|
||||||
const clone: Prototype = {};
|
const clone: Prototype = {};
|
||||||
Object.getOwnPropertyNames(prototype).forEach((fn) => {
|
Object.getOwnPropertyNames(prototype).forEach((fn) => {
|
||||||
if (fn !== 'constructor' && _.isFunction(prototype[fn])) {
|
if (fn !== 'constructor' && typeof prototype[fn] === 'function') {
|
||||||
clone[fn] = prototype[fn];
|
clone[fn] = prototype[fn];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user