If an ENV var is undefined, using @echo returns undefined as a string (see https://github.com/jsoverson/preprocess/issues/112). This means the documentation, which recommends setting a default JS value, is currently wrong if the ENV var does not exist:
var configValue = '/* @echo FOO */' || 'default value';
Coverage increased (+0.01%) to 97.581% when pulling 99363ff4b13e0d9908d33e82834907b01d5c8977 on froddd:master into 704d28987837f38abcd6b2e07ba65928e43f2983 on jsoverson:master.
If an ENV var is undefined, using
@echo
returnsundefined
as a string (see https://github.com/jsoverson/preprocess/issues/112). This means the documentation, which recommends setting a default JS value, is currently wrong if the ENV var does not exist:produces:
With the fix, this now produces:
(Fixes #112)