aboutsummaryrefslogtreecommitdiff
path: root/build/hypixelCached.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/hypixelCached.js')
-rw-r--r--build/hypixelCached.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/hypixelCached.js b/build/hypixelCached.js
index bf01171..cb8d0db 100644
--- a/build/hypixelCached.js
+++ b/build/hypixelCached.js
@@ -107,7 +107,9 @@ async function fetchPlayer(user) {
path: 'player',
args: { uuid: playerUuid }
});
- playerCache.set(playerUuid, cleanPlayer);
+ // clone in case it gets modified somehow later
+ const cleanPlayerClone = Object.assign({}, cleanPlayer);
+ playerCache.set(playerUuid, cleanPlayerClone);
return cleanPlayer;
}
exports.fetchPlayer = fetchPlayer;