Commit 9916b894 authored by Taylor Hanayik's avatar Taylor Hanayik
Browse files

Merge branch 'fix-cancel-action' into 'master'

handle null file return value

See merge request !10
parents 2744efe9 552de6ef
......@@ -315,9 +315,10 @@ export default function Bet() {
})
inFileSocket.on('files', (data) => {
console.log(data)
updateBetOptsValue('input', data[0])
setNiivueImage(`http://${host}:${fileServerPort}/file/?filename=${data[0]}`)
updateBetOptsValue('input', data[0] ? data[0] : '')
if (data[0] !== '') {
setNiivueImage(`http://${host}:${fileServerPort}/file/?filename=${data[0]}`)
}
})
runSocket.on('run', (data) => {
......@@ -350,7 +351,7 @@ export default function Bet() {
}, [useCrosshairs])
function setOutputName(fileName) {
if (fileName === '') {
if (fileName === '' || typeof fileName === 'undefined') {
return ''
}
let extIdx = fileName.lastIndexOf('.nii')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment