diff --git a/lib/less/tree/mixin.js b/lib/less/tree/mixin.js index 8cf7442..2a5bdf0 100644 --- a/lib/less/tree/mixin.js +++ b/lib/less/tree/mixin.js @@ -225,7 +225,8 @@ tree.mixin.Definition.prototype = { if (! this.variadic) { if (argsLength < this.required) { return false; } if (argsLength > this.params.length) { return false; } - if ((this.required > 0) && (argsLength > this.params.length)) { return false; } + } else { + if (argsLength < (this.required - 1)) { return false; } } len = Math.min(argsLength, this.arity); diff --git a/test/less/mixins-args.less b/test/less/mixins-args.less index e7fd38b..8cdc67d 100644 --- a/test/less/mixins-args.less +++ b/test/less/mixins-args.less @@ -202,4 +202,14 @@ body { } .selector3 { .mixin-comma-default3(4,2,2,2); +} + +.test-calling-one-arg-mixin(@a) { +} + +.test-calling-one-arg-mixin(@a, @b, @rest...) { +} + +div { + .test-calling-one-arg-mixin(1); } \ No newline at end of file