diff options
author | RabsRincon <ruben@rinconblanco.es> | 2019-12-08 04:08:59 +0100 |
---|---|---|
committer | RabsRincon <ruben@rinconblanco.es> | 2019-12-08 04:08:59 +0100 |
commit | 91c3362840d6819fc965e513d5405600c14ab1e6 (patch) | |
tree | d24b728080e83118d09db8a3ce13f3f28f94a570 /lib/compilers/zig.js | |
parent | f733d6f3ccaea6cec3dd0cbdc08fb14eb1e2a637 (diff) | |
download | compiler-explorer-91c3362840d6819fc965e513d5405600c14ab1e6.tar.gz compiler-explorer-91c3362840d6819fc965e513d5405600c14ab1e6.zip |
Stop zig from crashing if semver is not set
Closes #1710
Diffstat (limited to 'lib/compilers/zig.js')
-rw-r--r-- | lib/compilers/zig.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compilers/zig.js b/lib/compilers/zig.js index ca8225fc7..1ebbfa441 100644 --- a/lib/compilers/zig.js +++ b/lib/compilers/zig.js @@ -61,7 +61,7 @@ class ZigCompiler extends BaseCompiler { optionsForFilter(filters, outputFilename, userOptions) { let options = [filters.execute ? 'build-exe' : 'build-obj']; - if (this.compiler.semver === 'trunk' || Semver.gt(this.compiler.semver, '0.3.0')) { + if (this.compiler.semver === 'trunk' || (this.compiler.semver && Semver.gt(this.compiler.semver, '0.3.0'))) { const outputDir = path.dirname(outputFilename); const desiredName = path.basename(outputFilename); // strip '.s' if we aren't executing |