Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@brianush1
Copy link

@brianush1 brianush1 commented Jul 29, 2019

  • Fixed typo (if (e.async)) that lead to the Or, if you meant to create an async function, pass async: true as an option. message always being shown regardless of the async option.
  • Fixed problem in the __express function where a raw Promise was being passed to express.js when async was enabled, instead of waiting on the Promise to resolve and passing the result to express.

Edit: If anyone is having this problem and would like to fix it, until this gets merged, use:

ejs.__express = (file, options, callback) => {
	if (options.async) {
		ejs.renderFile(file, options, async (err, promise) => {
			callback(err, await promise);
		});
	}
	else {
		ejs.renderFile(file, options, callback);
	}
}

e.message += 'If the above error is not helpful, you may want to try EJS-Lint:\n';
e.message += 'https://github.com/RyanZim/EJS-Lint';
if (!e.async) {
if (!opts.async) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already fixed this in #460 (d6376fa).

@mde
Copy link
Owner

mde commented Mar 29, 2020

As @ExE-Boss noted, this is already fixed.

@mde mde closed this Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants