This is an automated email from the ASF dual-hosted git repository.
monkeydluffy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new f25b09e7a fix(nacos): add skipped nil check for "applications" upvalue
(#9960)
f25b09e7a is described below
commit f25b09e7a1939ffcd647d1b86a2e10cb9a7473a4
Author: Ashish Tiwari <[email protected]>
AuthorDate: Tue Aug 8 07:36:56 2023 +0530
fix(nacos): add skipped nil check for "applications" upvalue (#9960)
---
apisix/discovery/nacos/init.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/apisix/discovery/nacos/init.lua b/apisix/discovery/nacos/init.lua
index e12c025c5..2e06f5553 100644
--- a/apisix/discovery/nacos/init.lua
+++ b/apisix/discovery/nacos/init.lua
@@ -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]