1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Merge pull request #13998 from calixteman/bug1729971

Write boolean value when saving a form (bug 1729971)
This commit is contained in:
Jonas Jenwald 2021-09-12 15:38:10 +02:00 committed by GitHub
commit 761519ef3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -83,10 +83,14 @@ function writeValue(value, buffer, transform) {
buffer.push(`(${escapeString(value)})`);
} else if (typeof value === "number") {
buffer.push(numberToString(value));
} else if (typeof value === "boolean") {
buffer.push(`${value.toString()}`);
} else if (isDict(value)) {
writeDict(value, buffer, transform);
} else if (isStream(value)) {
writeStream(value, buffer, transform);
} else {
warn(`Unhandled value in writer: ${typeof value}, please file a bug.`);
}
}