Skip to content

Commit 9bdbf70

Browse files
committed
squash: do not mutate functions
1 parent 3da5607 commit 9bdbf70

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/common/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ function mustNotCall(msg) {
522522
const _mustNotMutateProxies = new WeakMap();
523523

524524
function mustNotMutate(object) {
525-
if (object === null || typeof object !== 'object')
525+
if (object === null ||
526+
typeof object !== 'object' && typeof object !== 'function')
526527
return object;
527528

528529
const cachedProxy = _mustNotMutateProxies.get(object);

0 commit comments

Comments
 (0)