MM-11324 Added defensive code to hashCode function (#1925)
This commit is contained in:
parent
977575e4b8
commit
d410b1eed3
1 changed files with 1 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ const hashCode = (str) => {
|
|||
let hash = 0;
|
||||
let i;
|
||||
let chr;
|
||||
if (str.length === 0) {
|
||||
if (!str || str.length === 0) {
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue