Merge pull request #341 from macedigital/fix-identicon-hash-size
Fix: Truncate key-length when generating identicons
This commit is contained in:
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…
Reference in New Issue
Block a user