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.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 26f28f5b48..cb07a0ee7b 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -414,21 +414,17 @@ bool app::alert(CJS_Runtime* pRuntime,
}
WideString swMsg;
- if (newParams[0].ToV8Value()->IsObject()) {
- if (newParams[0].IsArrayObject()) {
- CJS_Array carray(pRuntime->ToArray(newParams[0].ToV8Value()));
- swMsg = L"[";
- for (int i = 0; i < carray.GetLength(pRuntime); ++i) {
- if (i)
- swMsg += L", ";
-
- CJS_Value element(carray.GetElement(pRuntime, i));
- swMsg += pRuntime->ToWideString(element.ToV8Value());
- }
- swMsg += L"]";
- } else {
- swMsg = pRuntime->ToWideString(newParams[0].ToV8Value());
+ if (newParams[0].ToV8Value()->IsArray()) {
+ CJS_Array carray(pRuntime->ToArray(newParams[0].ToV8Value()));
+ swMsg = L"[";
+ for (int i = 0; i < carray.GetLength(pRuntime); ++i) {
+ if (i)
+ swMsg += L", ";
+
+ CJS_Value element(carray.GetElement(pRuntime, i));
+ swMsg += pRuntime->ToWideString(element.ToV8Value());
}
+ swMsg += L"]";
} else {
swMsg = pRuntime->ToWideString(newParams[0].ToV8Value());
}