From c9b528f1dc947529e11d458ab6672078b90df397 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Fri, 16 Sep 2016 00:32:47 +0000 Subject: [PATCH] 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 --- src/Socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Socket.cpp b/src/Socket.cpp index 6ed17398..c47e9be0 100644 --- a/src/Socket.cpp +++ b/src/Socket.cpp @@ -91,7 +91,7 @@ void Socket::startTls(const v8::FunctionCallbackInfo& 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(); }