mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-11-24 22:45:48 +00:00
Update src/cleartext.js
Co-authored-by: larabr <larabr+github@protonmail.com>
This commit is contained in:
parent
364eb1ee18
commit
a3a934d06b
@ -36,7 +36,7 @@ export class CleartextMessage {
|
|||||||
* @param {Signature} signature - The detached signature or an empty signature for unsigned messages
|
* @param {Signature} signature - The detached signature or an empty signature for unsigned messages
|
||||||
*/
|
*/
|
||||||
constructor(text, signature) {
|
constructor(text, signature) {
|
||||||
// remove trailing whitespace from each line
|
// remove trailing whitespace from each line and normalize line endings to LF
|
||||||
this.text = util.removeTrailingSpaces(text);
|
this.text = util.removeTrailingSpaces(text);
|
||||||
if (signature && !(signature instanceof Signature)) {
|
if (signature && !(signature instanceof Signature)) {
|
||||||
throw new Error('Invalid signature input');
|
throw new Error('Invalid signature input');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user