summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-10-31 00:32:51 +0800
committerruki <[email protected]>2018-10-30 21:17:10 +0800
commit06481639fce5515f1708e23367aab5bfa20f0e53 (patch)
tree585d96948ce4453e63e7800f0e079225bf6317e3
parent6dd382a5767952c8be54f1b8af8d9cdde0a01131 (diff)
fix package:config()
-rw-r--r--xmake/core/package/package.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index f2439ab2b..0c9261a07 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -427,7 +427,9 @@ end
-- get the given configuration value of package
function _instance:config(name)
local configs = self:configs()
- return configs and configs[name] or nil
+ if configs then
+ return configs[name]
+ end
end
-- is optional package?