From f51b8f32b0f9031bf30ced4fd4c3f0ad6f6213e8 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 27 Apr 2012 18:34:40 +0100 Subject: moduleapi: get_host_type(): Return nil for global modules (no host) --- core/moduleapi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/moduleapi.lua') diff --git a/core/moduleapi.lua b/core/moduleapi.lua index 8e76a247..8c57e301 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -42,7 +42,7 @@ function api:get_host() end function api:get_host_type() - return hosts[self.host].type; + return self.host ~= "*" and hosts[self.host].type or nil; end function api:set_global() -- cgit v1.2.3