mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Fix js tests with placeholder
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
e2877c4999
commit
6cb40cf0c4
1 changed files with 5 additions and 5 deletions
|
|
@ -112,7 +112,7 @@
|
|||
|
||||
// Convert a string to an integer evenly
|
||||
function hashToInt(hash, maximum) {
|
||||
var final = 0;
|
||||
var finalInt = 0;
|
||||
var result = Array();
|
||||
|
||||
// Splitting evenly the string
|
||||
|
|
@ -121,13 +121,13 @@
|
|||
result.push(parseInt(hash.charAt(i), 16) % 16);
|
||||
}
|
||||
// Adds up all results
|
||||
for (var i in result) {
|
||||
final += result[i];
|
||||
for (var j in result) {
|
||||
finalInt += result[j];
|
||||
}
|
||||
// chars in md5 goes up to f, hex:16
|
||||
return parseInt(final % maximum);
|
||||
// make sure we're always using int in our operation
|
||||
return parseInt(parseInt(finalInt) % maximum);
|
||||
}
|
||||
|
||||
return finalPalette[hashToInt(hash, steps * 3 )];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue