From 41b0e0e586659bb4a06a85fb324d0463269c86fe Mon Sep 17 00:00:00 2001 From: Sebastian Mueller Date: Wed, 29 Mar 2023 17:59:00 +0200 Subject: [PATCH] Fix for #8 --- package.json | 2 +- src/process-graph-response.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f5745fd..f5089e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chatgpt-mattermost-bot", - "version": "1.3.0", + "version": "1.3.1", "private": true, "scripts": { "start": "node ./src/botservice.js" diff --git a/src/process-graph-response.js b/src/process-graph-response.js index 01617f1..384cb17 100644 --- a/src/process-graph-response.js +++ b/src/process-graph-response.js @@ -4,7 +4,7 @@ const { Log } = require('debug-level') const log = new Log('bot') const yFilesGPTServerUrl = process.env['YFILES_SERVER_URL'] -const yFilesEndpoint = new URL('/json-to-svg', yFilesGPTServerUrl) +const yFilesEndpoint = yFilesGPTServerUrl ? new URL('/json-to-svg', yFilesGPTServerUrl) : undefined /**\ * @param {string} content