From 011f785a79cab8d2256486005c0735d8b1a39285 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 1 Sep 2024 23:25:29 +0300 Subject: [PATCH] Better switch value --- public/scripts/utils.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/scripts/utils.js b/public/scripts/utils.js index 647b81ce6..8f0ca59a7 100644 --- a/public/scripts/utils.js +++ b/public/scripts/utils.js @@ -45,9 +45,7 @@ export function convertValueType(value, type) { return value; } - type = type.trim().toLowerCase(); - - switch (type) { + switch (type.trim().toLowerCase()) { case 'string': case 'str': return String(value);