Skip to content

Commit

Permalink
fix(nacos): add skipped nil check for "applications" upvalue (#9960)
Browse files Browse the repository at this point in the history
  • Loading branch information
Revolyssup authored Aug 8, 2023
1 parent 8773687 commit f25b09e
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 f25b09e

Please sign in to comment.