From 26a91e889176271c797f284b3c763f2163a641f6 Mon Sep 17 00:00:00 2001 From: xuezu Date: Wed, 12 Nov 2014 14:38:27 +0800 Subject: [PATCH] fix or charset logic --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 0851ffa..6ec8e65 100644 --- a/index.js +++ b/index.js @@ -96,7 +96,7 @@ proto.getSource = function (name) { this.pathsToNames[fullpath] = name; var content = fs.readFileSync(fullpath); debug('view %s mapping to %s, charset: %s, size: %d', name, fullpath, charset, content.length); - if (charset && (charset !== 'utf8' || charset !== 'utf-8')) { + if (charset && charset !== 'utf8' && charset !== 'utf-8') { content = iconv.decode(content, charset); } else { content = content.toString();