summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-02-07 11:22:53 +0800
committerGitHub <[email protected]>2020-02-07 11:22:53 +0800
commit934060abc30c69df6ec9ae1f9fa8ec4e7d99dab0 (patch)
treea1184381f7e3a55d4f88daa1bb7010f9126939e4
parentc1262215a240eefc46a97b88ec3086e0c55947e3 (diff)
parent98d788b6df2e95725e2435fff8469deb3ff74e8c (diff)
Merge pull request #678 from rivy/fix.taskmenu
fix ~ allow empty/`nil` taskmenu
-rw-r--r--xmake/core/base/option.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/core/base/option.lua b/xmake/core/base/option.lua
index 4fa61ad12..36ed4b657 100644
--- a/xmake/core/base/option.lua
+++ b/xmake/core/base/option.lua
@@ -446,7 +446,9 @@ function option.defaults(task)
-- get the default options for the given task
local defaults = {}
- option.populate_defaults(taskmenu.options, defaults)
+ if taskmenu then
+ option.populate_defaults(taskmenu.options, defaults)
+ end
return defaults
end