summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/app.cpp')
-rw-r--r--fpdfsdk/javascript/app.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index f29a098fde..eec468186f 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -282,8 +282,7 @@ bool app::viewerVersion(CJS_Runtime* pRuntime,
return false;
#ifdef PDF_ENABLE_XFA
CPDFXFA_Context* pXFAContext = pRuntime->GetFormFillEnv()->GetXFAContext();
- if (pXFAContext->GetDocType() == XFA_DocType::kFull ||
- pXFAContext->GetDocType() == XFA_DocType::kForegroundOnly) {
+ if (pXFAContext->ContainsXFAForm()) {
vp << JS_NUM_VIEWERVERSION_XFA;
return true;
}