Skip to content

Commit

Permalink
lint bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
noel-schenk committed Sep 19, 2019
1 parent 7804ab7 commit cf27beb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1772,9 +1772,9 @@ exports.twing = fromStringRenderer('twing');
*/

exports.twing.render = function(str, options, cb) {
if(!semver.satisfies(process.version, '>=6.0.0')){
if (!semver.satisfies(process.version, '>=6.0.0')) {
return promisify(cb, function(cb) {
throw 'This node version is not supported for Twing. Please upgrade to at least node version 6.0.0 or a recommended version >=8.x';
throw new Error('This node version is not supported for Twing. Please upgrade to at least node version 6.0.0 or a recommended version >=8.x');
});
}
return promisify(cb, function(cb) {
Expand Down
5 changes: 3 additions & 2 deletions test/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ require('./shared').test('razor');
require('./shared').test('squirrelly');
require('./shared/partials').test('squirrelly');
require('./shared/helpers').test('squirrelly');
if(semver.satisfies(process.version, '>=6.0.0'))
require('./shared').test('twing');
if (semver.satisfies(process.version, '>=6.0.0')) {
require('./shared').test('twing');
}

0 comments on commit cf27beb

Please sign in to comment.