From 4cb962c5cd1352c2f9c4a2e93df80cf4d40f8e49 Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Tue, 10 Jan 2012 21:58:52 +0100 Subject: [PATCH] refactor rhino setup logic --- lib/less/parser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/less/parser.js b/lib/less/parser.js index e8d83629..d43ddbe0 100644 --- a/lib/less/parser.js +++ b/lib/less/parser.js @@ -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 = typeof(window) != 'undefined' ? window.less : {}; + if (typeof(window) === 'undefined') { less = {} } + else { less = window.less = {} } tree = less.tree = {}; less.mode = 'rhino'; } else if (typeof(window) === 'undefined') {