Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
fix: create a local module if is not relative or absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Feb 6, 2020
1 parent 04e3938 commit 21bacce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,15 @@ Executable ${this.denoInfo.executablePath}`;
return;
}

if (text.indexOf(".") !== 0 || text.indexOf("/") !== 0) {
this.output.appendLine(
`Cannot create module \`${text
}\`. Module is not relative or absolute`
);
this.output.show();
return;
}

let defaultTextContent = "";

switch (extName) {
Expand Down

0 comments on commit 21bacce

Please sign in to comment.