diff --git a/src/node/node_class.hpp b/src/node/node_class.hpp index ec541b051e..8fdec3bf2b 100644 --- a/src/node/node_class.hpp +++ b/src/node/node_class.hpp @@ -1411,12 +1411,6 @@ Napi::Value ObjectWrap::constructor_callback(const Napi::CallbackInfo return scope.Escape(env.Null()); // return a value to comply with Napi::FunctionCallback } else { - // XXX: Remove this now that we declare a constructor for the RealmObjectClass - bool isRealmObjectClass = std::is_same>::value; - if (isRealmObjectClass) { - return scope.Escape(env.Null()); // return a value to comply with Napi::FunctionCallback - } - throw Napi::Error::New(env, "Illegal constructor"); } }