diff options
author | Matt Godbolt <matt@godbolt.org> | 2017-12-21 07:49:41 -0600 |
---|---|---|
committer | Matt Godbolt <matt@godbolt.org> | 2017-12-21 07:49:41 -0600 |
commit | 69ca21d67398282f93d2a19e45aa0d3dd0ff7e33 (patch) | |
tree | 48b24cd27e47c86813edeccba32b294183295385 /lib/compilers/golang.js | |
parent | acca036eeb4f4da21ba8d6b1f7dc2d8af82409f8 (diff) | |
download | compiler-explorer-69ca21d67398282f93d2a19e45aa0d3dd0ff7e33.tar.gz compiler-explorer-69ca21d67398282f93d2a19e45aa0d3dd0ff7e33.zip |
Remove filter(_.identity) in favour of _.compact()
Diffstat (limited to 'lib/compilers/golang.js')
-rw-r--r-- | lib/compilers/golang.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compilers/golang.js b/lib/compilers/golang.js index 4afb4dfbf..18a299f17 100644 --- a/lib/compilers/golang.js +++ b/lib/compilers/golang.js @@ -34,7 +34,7 @@ function compilenewgol(info, env) { let prevLine = null; let file = null; let fileCount = 0; - return code.map(function (obj) { + return _.compact(code.map(function (obj) { const line = obj.text; const match = line.match(re); if (match) { @@ -51,7 +51,7 @@ function compilenewgol(info, env) { return res + "\t" + match[4].toLowerCase() + match[5]; } else return null; - }).filter(_.identity).join("\n"); + })).join("\n"); } compiler.postProcess = function (result, outputFilename, filters) { |