Prevent negative hashes from being generated (#9501)

Fixes #9499
This commit is contained in:
Rijk van Zanten
2021-11-04 20:21:39 -04:00
committed by GitHub
parent 3cbd908839
commit b2f3091826

View File

@@ -9,5 +9,5 @@ export function simpleHash(str: string) {
hash = 31 * hash + str.charCodeAt(i++);
}
return hash.toString(16);
return Math.abs(hash).toString(16);
}