summaryrefslogtreecommitdiff
path: root/fxjs/cjs_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_runtime.cpp')
-rw-r--r--fxjs/cjs_runtime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp
index 9329a483f4..6042538e30 100644
--- a/fxjs/cjs_runtime.cpp
+++ b/fxjs/cjs_runtime.cpp
@@ -234,7 +234,7 @@ v8::Local<v8::Value> CJS_Runtime::MaybeCoerceToNumber(
v8::Local<v8::Value> value) {
bool bAllowNaN = false;
if (value->IsString()) {
- ByteString bstr = ByteString::FromUnicode(ToWideString(value));
+ ByteString bstr = ToWideString(value).ToDefANSI();
if (bstr.GetLength() == 0)
return value;
if (bstr == "NaN")