Additional update for when window is not defined

This commit is contained in:
Ken McHugh
2012-01-10 20:34:32 +08:00
parent 39f277f726
commit e90fbdfd42

View File

@@ -3,8 +3,8 @@ var less, tree;
if (typeof environment === "object" && ({}).toString.call(environment) === "[object Environment]") {
// Rhino
// Details on how to detect Rhino: https://github.com/ringo/ringojs/issues/88
if (typeof(window) === 'undefined') { window.less = {} }
less = window.less || {};
if (typeof(window) != 'undefined') { window.less = {} }
less = typeof(window) != 'undefined' ? window.less : {};
tree = less.tree = {};
less.mode = 'rhino';
} else if (typeof(window) === 'undefined') {