aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4numberobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4numberobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4numberobject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4numberobject.cpp b/src/qml/jsruntime/qv4numberobject.cpp
index 9b1f72bc17..3a6b9da763 100644
--- a/src/qml/jsruntime/qv4numberobject.cpp
+++ b/src/qml/jsruntime/qv4numberobject.cpp
@@ -285,7 +285,7 @@ ReturnedValue NumberPrototype::method_toPrecision(CallContext *ctx)
return Encode::undefined();
if (!ctx->argc() || ctx->args()[0].isUndefined())
- return RuntimeHelpers::toString(scope.engine, v);
+ return Encode(v->toString(scope.engine));
int precision = ctx->args()[0].toInt32();
if (precision < 1 || precision > 21) {