Merge pull request #341 from macedigital/fix-identicon-hash-size

Fix: Truncate key-length when generating identicons
pull/343/merge
Martin Zimmermann 7 years ago committed by GitHub
commit 650c6cf126

@ -47,7 +47,7 @@ define(["app/lib/promise", "app/config"], function(Q, config) {
}
Q.when(key, function(key) {
var hash = pad((parseInt(key, 16) % Math.pow(2, 18)).toString(2), 18),
var hash = pad((parseInt(key.substr(-16), 16) % Math.pow(2, 18)).toString(2), 18),
index = 0;
svg.setAttribute("data-hash", key);

Loading…
Cancel
Save