From fba69916c60459e9ebab5cebe73ad4de1b1b9211 Mon Sep 17 00:00:00 2001 From: Ariya Hidayat Date: Tue, 8 Oct 2013 16:56:23 -0700 Subject: [PATCH] Be specific, avoid variable name conflict. --- cssbeautify.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cssbeautify.js b/cssbeautify.js index d4ef93f..75565f4 100644 --- a/cssbeautify.js +++ b/cssbeautify.js @@ -89,13 +89,13 @@ } function closeBlock() { - var ch; + var last; depth -= 1; formatted = trimRight(formatted); if (formatted.length > 0 && autosemicolon) { - ch = formatted.charAt(formatted.length - 1); - if (ch !== ';' && ch !== '{') { + last = formatted.charAt(formatted.length - 1); + if (last !== ';' && last !== '{') { formatted += ';'; } }