diff options
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index 8ef9e5884..b96db2849 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -359,7 +359,8 @@ end -- is top level? user top requires in xmake.lua function _instance:is_toplevel() - return not self:parents() + local requireinfo = self:requireinfo() + return requireinfo and requireinfo.is_toplevel end -- is the system package? |
