mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
hash = object in JS
This commit is contained in:
parent
c75c46aa9d
commit
dda4821b8e
@ -110,7 +110,7 @@ function callback_for(uuid, type, err, hash) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function array_has_hash(arr, property, value) {
|
function array_has_obj(arr, property, value) {
|
||||||
for (var i = 0; i < arr.length; i++) {
|
for (var i = 0; i < arr.length; i++) {
|
||||||
if (arr[i][property] === value) {
|
if (arr[i][property] === value) {
|
||||||
return true;
|
return true;
|
||||||
@ -126,7 +126,7 @@ function store_images(uuid, details, type, callback) {
|
|||||||
type: type,
|
type: type,
|
||||||
callback: callback
|
callback: callback
|
||||||
};
|
};
|
||||||
if (!array_has_hash(currently_running, "uuid", uuid)) {
|
if (!array_has_obj(currently_running, "uuid", uuid)) {
|
||||||
currently_running.push(new_hash);
|
currently_running.push(new_hash);
|
||||||
networking.get_profile((is_uuid ? uuid : null), function(err, profile) {
|
networking.get_profile((is_uuid ? uuid : null), function(err, profile) {
|
||||||
if (err || (is_uuid && !profile)) {
|
if (err || (is_uuid && !profile)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user