Skip to content

Commit

Permalink
fix(nacos): add skipped nil check for "applications" upvalue (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Revolyssup authored and mywildquant committed Aug 8, 2023
1 parent d81c2f2 commit b9566f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apisix/discovery/nacos/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ function _M.nodes(service_name, discovery_args)
waiting_time = waiting_time - step
end

if not applications[namespace_id] or not applications[namespace_id][group_name] then
if not applications or not applications[namespace_id]
or not applications[namespace_id][group_name]
then
return nil
end
return applications[namespace_id][group_name][service_name]
Expand Down

0 comments on commit b9566f3

Please sign in to comment.