diff --git a/ea-scripts/Add Link to Existing File and Open.md b/ea-scripts/Add Link to Existing File and Open.md index 1c24741..46361b6 100644 --- a/ea-scripts/Add Link to Existing File and Open.md +++ b/ea-scripts/Add Link to Existing File and Open.md @@ -45,7 +45,7 @@ ea.style.strokeColor = "rgba(70,130,180,0.05)" ea.style.strokeWidth = 2; ea.style.roughness = 0; -if(elements.lenght===1 && elements[0].type !== "text") { +if(elements.length===1 && elements[0].type !== "text") { ea.copyViewElementsToEAforEditing(elements); ea.getElements()[0].link = link; } else { @@ -62,4 +62,4 @@ if(openInCurrentPane) { app.workspace.openLinkText(file.path,ea.targetView.file.path,false); return; } -ea.openFileInNewOrAdjacentLeaf(file); \ No newline at end of file +ea.openFileInNewOrAdjacentLeaf(file);