diff --git a/packages/insomnia-app/app/ui/components/base/file-input-button.js b/packages/insomnia-app/app/ui/components/base/file-input-button.js index eaa30a59e..132c5c6fb 100644 --- a/packages/insomnia-app/app/ui/components/base/file-input-button.js +++ b/packages/insomnia-app/app/ui/components/base/file-input-button.js @@ -78,7 +78,10 @@ class FileInputButton extends React.PureComponent { render() { const { showFileName, showFileIcon, path, name, ...extraProps } = this.props; - const fileName = pathBasename(path); + + // NOTE: Basename fails if path is not a string, so let's make sure it is + const fileName = typeof path === 'string' ? pathBasename(path) : null; + return (