diff --git a/source/scriptinterface/Object.h b/source/scriptinterface/Object.h index 25ebadd219..75f6ce224e 100644 --- a/source/scriptinterface/Object.h +++ b/source/scriptinterface/Object.h @@ -135,7 +135,7 @@ template inline bool GetObjectClassName(const ScriptRequest& rq, JS::HandleObject obj, T& name) { JS::RootedValue constructor(rq.cx, JS::ObjectOrNullValue(JS_GetConstructor(rq.cx, obj))); - return constructor.isObject() && Script::HasProperty(rq, constructor, "name") && Script::GetProperty(rq, constructor, "name", name); + return constructor.isObject() && Script::GetProperty(rq, constructor, "name", name); } /**