summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-14 23:07:12 +0800
committerruki <[email protected]>2020-05-14 12:43:17 +0800
commit0648c5178d1fabbaa082db10aeb1fa6bf822bd6a (patch)
tree1ec16af65d357a0761b90117e57135c58ccbc541 /xmake/core/project/target.lua
parentc2e533cef2040461bb77a64349d28db924d4150b (diff)
get default policy value
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index 3382910d7..ac1b45fbe 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -472,9 +472,7 @@ end
-- get the target policy
function _instance:policy(name)
local policies = self:get("policy")
- if policies then
- return policy.check(name, policies[name])
- end
+ return policy.check(name, policies and policies[name])
end
-- get the base name of target file