From 14dec5044b3c5d307e886bb32161670039986300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bouget?= Date: Wed, 26 Jun 2024 16:26:42 +0200 Subject: [PATCH] Fix import external file path --- src/app/app.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 86e8b89..da3f80d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -105,11 +105,11 @@ export class AppComponent implements OnInit, OnDestroy, AfterViewInit { let path: string = ''; if (typeof input === 'string') { - // If command is called by saved json datas - path = input; - } else if (input instanceof File) { // If command is called by user - path = input.path; + path = input; + } else { + // If command is called by saved json datas + path = input?.path; } const content = await this.electronService.ipcRenderer.invoke(