Don't use String constructor in calculateDataSize

This commit is contained in:
Cohee 2025-03-01 14:30:48 +02:00
parent 45d8cac5a9
commit 661b84033f

View File

@ -197,7 +197,7 @@ const calculateChatSize = (charDir) => {
// Calculate the total string length of the data object
const calculateDataSize = (data) => {
return typeof data === 'object' ? Object.values(data).reduce((acc, val) => acc + new String(val).length, 0) : 0;
return typeof data === 'object' ? Object.values(data).reduce((acc, val) => acc + String(val).length, 0) : 0;
};
/**