Skip to content

Commit

Permalink
suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jtenner committed Jul 5, 2020
1 parent d3abe65 commit acd8725
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/asc.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,12 +469,12 @@ exports.main = function main(argv, options, callback) {
assemblyscript.parse(program, exports.libraryFiles[libPath], exports.libraryPrefix + libPath + extension.ext, false);
});
});
const customLibDirs = [];
let customLibDirs = [];
if (args.lib) {
let lib = args.lib;
if (typeof lib === "string") lib = lib.split(",");
lib = unique(lib.map(resolve));
Array.prototype.push.apply(customLibDirs, lib.map(lib => lib.trim()));
if (typeof lib === "string") lib = lib.trim().split(/\s*,\s*/);
customLibDirs.push(...lib.map(resolve));
customLibDirs = unique(customLibDirs); // because `lib` and `customLibDirs` could potentially has duplicates
for (let i = 0, k = customLibDirs.length; i < k; ++i) { // custom
let libDir = customLibDirs[i];
let libFiles;
Expand Down

0 comments on commit acd8725

Please sign in to comment.