Skip to content

Commit bb28e79

Browse files
Fdawgsjeysal
andauthored
refactor(jest-mock): remove useless conditional (#13561)
* refactor(jest-mock): remove useless conditional * Update CHANGELOG.md Co-authored-by: Tim Seckinger <seckinger.tim@gmail.com>
1 parent 4670d3b commit bb28e79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/jest-mock/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ export class ModuleMocker {
876876
const boundFunctionPrefix = 'bound ';
877877
let bindCall = '';
878878
// if-do-while for perf reasons. The common case is for the if to fail.
879-
if (name && name.startsWith(boundFunctionPrefix)) {
879+
if (name.startsWith(boundFunctionPrefix)) {
880880
do {
881881
name = name.substring(boundFunctionPrefix.length);
882882
// Call bind() just to alter the function name.

0 commit comments

Comments
 (0)