Skip to content

Commit

Permalink
jsdebugs "less-args" error is now printing param-names and is not pri…
Browse files Browse the repository at this point in the history
…nting

params double if a param has been specified.
  • Loading branch information
Joscha Rohmann committed Aug 19, 2016
1 parent 0871c4b commit 0345b25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/blocks/jsdebug.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@ function addError(message, error, method, paramNames) {
if (error.actual > 0) {
message.addText(', ');
}
for (index = 0; index < error.expected; index++) {
for (index = error.actual; index < error.expected; index++) {
message
.beginSpan({
'background-color': 'red',
padding: '0 5px',
color: 'white'
})
.addText('?')
.addText(paramNames[index] || '?')
.endSpan();
if (index != error.expected - 1) {
message.addText(', ');
Expand Down Expand Up @@ -320,7 +320,7 @@ function addError(message, error, method, paramNames) {

function debugFunc(callback) {
return function () {
if (blocks.debug.executing) {
if (blocks.debug.executing||!blocks.debug.enabled) {
return;
}
blocks.debug.executing = true;
Expand Down

0 comments on commit 0345b25

Please sign in to comment.