MM-11324 Added defensive code to hashCode function (#1925)

This commit is contained in:
Harrison Healey 2018-07-13 12:55:10 -04:00 committed by Sudheer
parent 977575e4b8
commit d410b1eed3

View file

@ -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;
}