Closed futurelucas4502 closed 3 years ago
Good catch! I never thought about that possibility.
In order to reduce code size, we could even change
function renderFile(filename, data, cb) {
var Config = getConfig(data || {});
to
function renderFile(filename, data, cb) {
data = data || {}
var Config = getConfig(data);
Do you want to submit a PR with the change?
Good idea I didn't even think about that and sure I'll do a pull request in just a sec
What version of yarn is being used classic or yarn 2?
Yarn classic
Describe the bug A clear and concise description of what the bug is.
When using renderFile if the data parameter is not passed it can cause an error as there is no check to see if it is undefined.
Changing this section of code to the following ensures no error will occur:
Environment: Node