diff core/configmanager.lua @ 863:fee8a700e92e

Automated merge with http://luaetta.ath.cx:1234/
author Matthew Wild <mwild1@gmail.com>
date Tue, 03 Mar 2009 17:18:43 +0000
parents 49298263f241
children 2c0b9e3c11c3
line wrap: on
line diff
--- a/core/configmanager.lua	Tue Mar 03 17:48:04 2009 +0100
+++ b/core/configmanager.lua	Tue Mar 03 17:18:43 2009 +0000
@@ -9,8 +9,8 @@
 
 
 local _G = _G;
-local 	setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile = 
-		setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile;
+local 	setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type = 
+		setmetatable, loadfile, pcall, rawget, rawset, io, error, dofile, type;
 
 module "configmanager"
 
@@ -117,10 +117,12 @@
 		
 		function env.Component(name)
 			return function (module)
-					set(name, "core", "component_module", module);
-					-- Don't load the global modules by default
-					set(name, "core", "modules_enable", false);
-					rawset(env, "__currenthost", name);
+					if type(module) == "string" then
+						set(name, "core", "component_module", module);
+						-- Don't load the global modules by default
+						set(name, "core", "modules_enable", false);
+						rawset(env, "__currenthost", name);
+					end
 				end
 		end
 		env.component = env.Component;