Skip to content

Commit 54707e1

Browse files
committed
Merge pull request #1315 from xzyfer/fix/1281
Fix type-of function reporting color for strings
2 parents 27e9980 + fa3b97f commit 54707e1

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

functions.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ namespace Sass {
822822
error(msg, pstate, backtrace);
823823
}
824824
catch (...) { throw; }
825-
// return something even if we had an error (-1)
825+
// handle any invalid utf8 errors
826826
return new (ctx.mem) Number(pstate, len);
827827
}
828828

@@ -913,7 +913,7 @@ namespace Sass {
913913
error(msg, pstate, backtrace);
914914
}
915915
catch (...) { throw; }
916-
// return something even if we had an error (-1)
916+
// handle any invalid utf8 errors
917917
return new (ctx.mem) Number(pstate, index);
918918
}
919919

@@ -1389,9 +1389,6 @@ namespace Sass {
13891389
if (v->concrete_type() == Expression::STRING) {
13901390
To_String to_string(&ctx);
13911391
string str(v->perform(&to_string));
1392-
if (ctx.names_to_colors.count(str)) {
1393-
return new (ctx.mem) String_Constant(pstate, "color");
1394-
}
13951392
}
13961393
return new (ctx.mem) String_Constant(pstate, ARG("$value", Expression)->type());
13971394
}

0 commit comments

Comments
 (0)