Don't use String constructor in calculateDataSize

661b84033fb5156d1e6d91d1593904b5dd138159

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +1 -1Ignore whitespace
src/endpoints/characters.js+1 -1
@@ -197,7 +197,7 @@ const calculateChatSize = (charDir) => {
197197
198// Calculate the total string length of the data object198// Calculate the total string length of the data object
199const calculateDataSize = (data) => {199const calculateDataSize = (data) => {
200 return typeof data === 'object' ? Object.values(data).reduce((acc, val) => acc + new String(val).length, 0) : 0;200 return typeof data === 'object' ? Object.values(data).reduce((acc, val) => acc + String(val).length, 0) : 0;
201};201};
202202
203/**203/**