Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong mode for node.js #460

Closed
marklagendijk opened this issue Nov 14, 2011 · 1 comment
Closed

Wrong mode for node.js #460

marklagendijk opened this issue Nov 14, 2011 · 1 comment

Comments

@marklagendijk
Copy link

Sorry that I am not doing this via a pull request, but I don't know how to use Git yet.
less.mode is set to 'rhino' when using node.js:

if (typeof environment === "object" && ({}).toString.call(environment) === "[object Environment]") {
    // Rhino
    // Details on how to detect Rhino: https://github.com/ringo/ringojs/issues/88
    less = {};
    tree = less.tree = {};
    less.mode = 'rhino';
} else if (typeof(window) === 'undefined') {
    // Node.js
    less = exports,
    tree = require('./tree');
    less.mode = 'rhino';
} 

I don't know what the implications of this bug are.

@cloudhead
Copy link
Member

Nice catch, it doesn't seem to have any effect, because the import function is overwritten in index.js, which makes me wonder what the point of this check actually is. Nevertheless, fixed it. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants