diff --git a/package.json b/package.json index 04abe44..b84f84d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wetty", - "version": "1.1.6", + "version": "1.1.7", "description": "WeTTY = Web + TTY. Terminal access in browser over http/https", "homepage": "https://github.com/krishnasrinivas/wetty", "repository": { diff --git a/src/server/ssl.ts b/src/server/ssl.ts index 1ab223d..958185b 100644 --- a/src/server/ssl.ts +++ b/src/server/ssl.ts @@ -4,7 +4,7 @@ import { isUndefined } from 'lodash'; import { SSL, SSLBuffer } from './interfaces'; export default async function loadSSL(ssl: SSL): Promise { - if (isUndefined(ssl.key) || isUndefined(ssl.cert)) return {}; + if (isUndefined(ssl) || isUndefined(ssl.key) || isUndefined(ssl.cert)) return {}; const files = [readFile(resolve(ssl.key)), readFile(resolve(ssl.cert))]; const [key, cert]: Buffer[] = await Promise.all(files); return { key, cert };