From 8fc48f42d441145b0733b40581ec509685dddd9b Mon Sep 17 00:00:00 2001 From: Kazuaki Matsuo Date: Thu, 16 Nov 2023 20:50:11 -0800 Subject: [PATCH] fix: undefined value reference --- app/renderer/actions/Session.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/renderer/actions/Session.js b/app/renderer/actions/Session.js index be351f551..dfd396870 100644 --- a/app/renderer/actions/Session.js +++ b/app/renderer/actions/Session.js @@ -531,7 +531,8 @@ export function newSession (caps, attachSessId = null) { const {protocol, hostname, port, path} = serverOpts; try { const detailsUrl = `${protocol}://${hostname}:${port}${path.replace(/\/$/, '')}/session/${attachSessId}`; - attachedSessionCaps = (await axios(detailsUrl).data).value; + const res = await axios({url: detailsUrl, headers: { 'content-type': HEADERS_CONTENT }, timeout: CONN_TIMEOUT}); + attachedSessionCaps = res.data.value; } catch (err) { // rethrow the error as session not running, but first log the original error to // console