[Pkg-javascript-commits] [less.js] 04/09: Pass this from promise based calling

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


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

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

commit 4d7f2927d43000bde767d7dc8ee38b65c89bbc49
Author: Forbes Lindesay <forbes at lindesay.co.uk>
Date:   Wed Nov 26 15:10:08 2014 +0000

    Pass this from promise based calling
    
    Fixes https://github.com/less/less-plugin-npm-import/issues/4
---
 lib/less/render.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/less/render.js b/lib/less/render.js
index 4a56609..5f711a2 100644
--- a/lib/less/render.js
+++ b/lib/less/render.js
@@ -13,8 +13,9 @@ module.exports = function(environment, ParseTree, ImportManager) {
         }
 
         if (!callback) {
+            var self = this;
             return new PromiseConstructor(function (resolve, reject) {
-                render(input, options, function(err, output) {
+                render.call(self, input, options, function(err, output) {
                     if (err) {
                         reject(err);
                     } 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