From 79833d8bba5994f30398d32d238fbe98854714d9 Mon Sep 17 00:00:00 2001 From: eight Date: Wed, 26 Sep 2018 11:40:04 +0800 Subject: [PATCH] Fix: a better way to draw list? --- js/usercss.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/usercss.js b/js/usercss.js index 1f7a4df4..55f5698c 100644 --- a/js/usercss.js +++ b/js/usercss.js @@ -49,8 +49,8 @@ var usercss = (() => { }); } - function drawList(chars) { - return chars.map(c => c === '"' ? "'\"'" : `"${c}"`).join(', '); + function drawList(items) { + return items.map(i => i.length === 1 ? JSON.stringify(i) : i).join(', '); } /**