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

Skip to content

Commit 717a1cf

Browse files
committed
fix pattern matching on values
1 parent 86ec9cc commit 717a1cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lessc.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ function patternMatch($block, $callingArgs) {
988988
foreach ($block->args as $i => $arg) {
989989
switch ($arg[0]) {
990990
case "lit":
991-
if (!$this->eq($arg[1], $callingArgs[$i])) {
991+
if (empty($callingArgs[$i]) || !$this->eq($arg[1], $callingArgs[$i])) {
992992
return false;
993993
}
994994
break;
@@ -1088,6 +1088,7 @@ function compileProp($prop, $block, $tags, &$_lines, &$_blocks) {
10881088
case 'mixin':
10891089
list(, $path, $args) = $prop;
10901090

1091+
$args = array_map(array($this, "reduce"), $args);
10911092
$mixins = $this->findBlocks($block, $path, $args);
10921093
if (is_null($mixins)) {
10931094
// echo "failed to find block: ".implode(" > ", $path)."\n";

0 commit comments

Comments
 (0)