This fixes Socket.startTls() when using the default TLS context.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3334 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2016-09-16 00:32:47 +00:00
parent 1aabcac59e
commit c9b528f1dc

View File

@ -91,7 +91,7 @@ void Socket::startTls(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (!socket->_tls) {
TlsContext* context = 0;
if (args.Length() > 0 && !args[0].IsEmpty() && !args[0]->IsUndefined()) {
if (args.Length() > 0 && !args[0].IsEmpty() && args[0]->IsObject()) {
if (TlsContextWrapper* wrapper = TlsContextWrapper::get(args[0])) {
context = wrapper->getContext();
}