From 437fb8a8a77465ffa997a0f7d5de2898c1f1aca2 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 12 Dec 2018 11:04:41 +0100 Subject: [PATCH] Ignore the `fieldValue` for Signature annotations, since they're currently unsupported (issue 10374) Given that Signature (Widget) annotations are currently not supported, since they cannot be validated, simply ignoring the `fieldValue` seems OK for now considering that attempting to blindly include unparsed/unvalidated data isn't very useful. Fixes 10347. --- src/core/annotation.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/annotation.js b/src/core/annotation.js index 6246671ad6f30..cd2dd298e6cab 100644 --- a/src/core/annotation.js +++ b/src/core/annotation.js @@ -613,8 +613,11 @@ class WidgetAnnotation extends Annotation { data.readOnly = this.hasFieldFlag(AnnotationFieldFlag.READONLY); - // Hide signatures because we cannot validate them. + // Hide signatures because we cannot validate them, and unset the fieldValue + // since it's (most likely) a `Dict` which is non-serializable and will thus + // cause errors when sending annotations to the main-thread (issue 10347). if (data.fieldType === 'Sig') { + data.fieldValue = null; this.setFlags(AnnotationFlag.HIDDEN); } }