Update armor.js

Only console.log if debug mode on
This commit is contained in:
Bart Butler 2017-08-19 10:52:36 -07:00 committed by GitHub
parent 1e8bd4315b
commit ad029f1929

View File

@ -227,7 +227,7 @@ function verifyHeaders(headers) {
if (!/^[^:\s]+: .+$/.test(headers[i])) {
throw new Error('Improperly formatted armor header: ' + headers[i]);
}
if (!/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(headers[i])) {
if (config.debug && !/^(Version|Comment|MessageID|Hash|Charset): .+$/.test(headers[i])) {
console.log('Unknown header: ' + headers[i]);
}
}