Skip to content

Commit 112bfec

Browse files
fixes svg-gradient function broken by prev. color object changes
1 parent f0d7b6a commit 112bfec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/less/functions/svg.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = function(environment) {
22
var Dimension = require("../tree/dimension"),
33
Color = require("../tree/color"),
4+
Expression = require("../tree/expression"),
45
Quoted = require("../tree/quoted"),
56
URL = require("../tree/url"),
67
functionRegistry = require("./function-registry");
@@ -50,7 +51,7 @@ module.exports = function(environment) {
5051
'<' + gradientType + 'Gradient id="gradient" gradientUnits="userSpaceOnUse" ' + gradientDirectionSvg + '>';
5152

5253
for (i = 0; i < stops.length; i+= 1) {
53-
if (stops[i].value) {
54+
if (stops[i] instanceof Expression) {
5455
color = stops[i].value[0];
5556
position = stops[i].value[1];
5657
} else {

0 commit comments

Comments
 (0)