diff options
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.cpp')
-rw-r--r-- | fpdfsdk/javascript/PublicMethods.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp index 462398012d..68fc30572b 100644 --- a/fpdfsdk/javascript/PublicMethods.cpp +++ b/fpdfsdk/javascript/PublicMethods.cpp @@ -1660,7 +1660,7 @@ bool CJS_PublicMethods::AFMakeNumber(CJS_Runtime* pRuntime, ws.Replace(L",", L"."); vRet = CJS_Value(pRuntime->NewString(ws.c_str())); vRet.MaybeCoerceToNumber(pRuntime); - if (vRet.GetType() != CJS_Value::VT_number) + if (!vRet.ToV8Value()->IsNumber()) vRet = CJS_Value(pRuntime->NewNumber(0)); return true; } @@ -1675,7 +1675,7 @@ bool CJS_PublicMethods::AFSimple_Calculate(CJS_Runtime* pRuntime, } CJS_Value params1(params[1]); - if (!params1.IsArrayObject() && params1.GetType() != CJS_Value::VT_string) { + if (!params1.IsArrayObject() && !params1.ToV8Value()->IsString()) { sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR); return false; } |