bugfix: only send a request when current_file is set

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej
2021-08-03 20:52:32 +02:00
parent d0de862af1
commit 1d40c8aeb2

View File

@@ -141,7 +141,7 @@ export default class App extends Mixins(BaseMixin) {
@Watch('current_file')
current_fileChanged(newVal: string) {
this.$socket.emit("server.files.metadata", { filename: newVal }, { action: "files/getMetadataCurrentFile" });
if (newVal !== "") this.$socket.emit("server.files.metadata", { filename: newVal }, { action: "files/getMetadataCurrentFile" });
}
@Watch('primaryColor')