[Pkg-javascript-commits] [less.js] 16/58: fixes svg-gradient function broken by prev. color object changes

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:28:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.3.0
in repository less.js.

commit 112bfec4e5a698f88bc9ecb984e2d81378c7f5d9
Author: seven-phases-max <seven.phases.max at gmail.com>
Date:   Sun Jan 11 22:13:12 2015 +0400

    fixes svg-gradient function broken by prev. color object changes
---
 lib/less/functions/svg.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/less/functions/svg.js b/lib/less/functions/svg.js
index 7014a48..ceec585 100644
--- a/lib/less/functions/svg.js
+++ b/lib/less/functions/svg.js
@@ -1,6 +1,7 @@
 module.exports = function(environment) {
     var Dimension = require("../tree/dimension"),
         Color = require("../tree/color"),
+        Expression = require("../tree/expression"),
         Quoted = require("../tree/quoted"),
         URL = require("../tree/url"),
         functionRegistry = require("./function-registry");
@@ -50,7 +51,7 @@ module.exports = function(environment) {
             '<' + gradientType + 'Gradient id="gradient" gradientUnits="userSpaceOnUse" ' + gradientDirectionSvg + '>';
 
         for (i = 0; i < stops.length; i+= 1) {
-            if (stops[i].value) {
+            if (stops[i] instanceof Expression) {
                 color = stops[i].value[0];
                 position = stops[i].value[1];
             } else {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list