From ba4cef7328271b46a944814b0914c389781b0cb9 Mon Sep 17 00:00:00 2001 From: sapphi-red <49056869+sapphi-red@users.noreply.github.com> Date: Wed, 15 Nov 2023 22:41:22 +0900 Subject: [PATCH] refactor: slice + index access --- vite.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index ab783999c..59b26360b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -55,7 +55,7 @@ export default defineConfig(({ command, mode }) => ({ const hljsLangIndex = id.indexOf(hljsLangs) if (id.includes(hljsLangs)) { // hljsは適当に二つに分割する - const firstLetter = id.slice(hljsLangIndex + hljsLangs.length)[0] + const firstLetter = id[hljsLangIndex + hljsLangs.length] if (firstLetter < 'i') { return 'hljs' }