From 0e23be39d1f28a00421bdff12f9746667ebca20e Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 11 Feb 2018 13:30:38 +0100 Subject: [PATCH] Reset title too when dragging file --- src/renderer.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer.jsx b/src/renderer.jsx index 9075dc1b..8407bab2 100644 --- a/src/renderer.jsx +++ b/src/renderer.jsx @@ -17,7 +17,7 @@ const dialog = electron.remote.dialog; function setFileNameTitle(filePath) { const appName = 'LosslessCut'; - document.title = `${appName} - ${path.basename(filePath)}`; + document.title = filePath ? `${appName} - ${path.basename(filePath)}` : 'appName'; } function getVideo() { @@ -110,6 +110,8 @@ class App extends React.Component { resetState(); + setFileNameTitle(); + this.setState({ working: true }); return ffmpeg.getFormat(filePath)