浏览代码

LibJS: Fix Number.parseFloat() attributes

This was missing an 'attr' and falling back to the default attributes.
Linus Groh 4 年之前
父节点
当前提交
a40e5b579a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp

+ 1 - 1
Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp

@@ -42,7 +42,7 @@ void NumberConstructor::initialize(GlobalObject& global_object)
     define_native_function(vm.names.isInteger, is_integer, 1, attr);
     define_native_function(vm.names.isNaN, is_nan, 1, attr);
     define_native_function(vm.names.isSafeInteger, is_safe_integer, 1, attr);
-    define_property(vm.names.parseFloat, global_object.get(vm.names.parseFloat));
+    define_property(vm.names.parseFloat, global_object.get(vm.names.parseFloat), attr);
     define_property(vm.names.EPSILON, Value(EPSILON_VALUE), 0);
     define_property(vm.names.MAX_VALUE, Value(NumericLimits<double>::max()), 0);
     define_property(vm.names.MIN_VALUE, Value(NumericLimits<double>::min()), 0);