fixed method 'check' error 'format' of undefined (#1424)

* fixed method 'check' error 'format' of undefined

* Added normalizeOptions
This commit is contained in:
lamo2k123 authored and Christopher Chedeau committed 2017-04-26 11:02:53 -07:00
1 parent 9c826c2ed5
commit 4b3835925e
1 file changed
+1 -1
+1 -1
View File
@@ -106,7 +106,7 @@ module.exports = {
},
check: function(text, opts) {
try {
const formatted = this.format(text, opts);
const formatted = formatWithShebang(text, normalizeOptions(opts));
return formatted === text;
} catch (e) {
return false;