diff options
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r-- | lib/compilers/zig.js | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index 1a9d0512d..d524fc1de 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -132,14 +132,12 @@ export class ZigCompiler extends BaseCompiler { } getIncludeArguments(libraries) { - return _.flatten( - _.map(libraries, selectedLib => { - const foundVersion = this.findLibVersion(selectedLib); - if (!foundVersion) return false; - // Zig should not have more than 1 path - return ['--pkg-begin', foundVersion.name, foundVersion.path, '--pkg-end']; - }), - ); + return libraries.flatMap(selectedLib => { + const foundVersion = this.findLibVersion(selectedLib); + if (!foundVersion) return []; + // Zig should not have more than 1 path, but it's still an array so spread it + return ['--pkg-begin', foundVersion.name, ...foundVersion.path, '--pkg-end']; + }); } getIrOutputFilename(inputFilename) { |