From 223b957eaa9adad63693c739c978ddd857ff0376 Mon Sep 17 00:00:00 2001 From: tnrich Date: Tue, 17 Sep 2019 22:44:34 -0700 Subject: [PATCH] fixing import filename passing --- .DS_Store | Bin 6148 -> 6148 bytes main.js | 13 +++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.DS_Store b/.DS_Store index 6c573c9185e98676d0cd43f8217fedc4c1016aec..fd639ebd754c51b51835367bc38caa7fb25d7379 100644 GIT binary patch delta 351 zcmZoMXfc=|#>B)qF;Q%yo}wr#0|Nsi1A_oVQh9MfQcivnkpFe_N5iWa*@WoXp}91A`lkOw25-Z0sDIT-==8eB7L|!5R7G!6k_$rNvH(MezbM!I>$k zNr^?_nJFb1A*p$;IjLo-dHzK{i6yB;(ICYk`T03O1rT;(QdnkcdAxv#bADb)Vtr;_ zY7y8#h#@iInRzMsR?X)aocyo0}WxD3}-~$HHcjn3bB9B`mu~2NHo}v&70|Nsi1A_oVN^x>dQht68 { + const fileName = filePath.replace(/^.*[\\\/]/, ""); + return bioParsers.anyToJson(data, { fileName }).then(res => { return res[0].parsedSequence; }); } @@ -39,9 +39,9 @@ async function createWindow(windowVars) { if (!windowVars && process.platform === "win32") { //windows only try { - startupWindowVars.initialSeqJson = await getSeqJsonFromPath( - startupWindowVars - ); + const initialSeqJson = await getSeqJsonFromPath(); + + startupWindowVars.initialSeqJson = initialSeqJson; } catch (e) { console.error(`e123421231:`, e); } @@ -76,7 +76,8 @@ app.on("will-finish-launching", () => { //mac only event.preventDefault(); try { - startupWindowVars.initialSeqJson = await getSeqJsonFromPath(path); + const initialSeqJson = await getSeqJsonFromPath(path); + startupWindowVars.initialSeqJson = initialSeqJson; } catch (e) { console.error(`e73562891230:`, e); }