summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript/app.cpp')
-rw-r--r--fpdfsdk/src/javascript/app.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 80a9b17aa9..379170f292 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -201,11 +201,12 @@ FX_BOOL app::viewerVersion(IJS_Context* cc,
CJS_Context* pContext = (CJS_Context*)cc;
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
CPDFXFA_Document* pDoc = pCurDoc->GetDocument();
- if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2)
+ if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) {
vp << JS_NUM_VIEWERVERSION_XFA;
- else
- vp << JS_NUM_VIEWERVERSION;
+ return TRUE;
+ }
+ vp << JS_NUM_VIEWERVERSION;
return TRUE;
}