Skip to content

Commit 6cced4f

Browse files
bytelazyCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 8893acd commit 6cced4f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apisix/plugins/grpc-transcode/response.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ local pairs = pairs
2828
local setmetatable = setmetatable
2929

3030
pb.option "decode_default_array"
31-
local repeated_label = 3
31+
-- Protobuf repeated field label value
32+
local PROTOBUF_REPEATED_LABEL = 3
33+
local repeated_label = PROTOBUF_REPEATED_LABEL
3234

3335
local function fetch_proto_array_names(proto_obj)
3436
local names = {}
@@ -50,7 +52,7 @@ end
5052

5153
local function set_default_array(tab, array_names)
5254
if type(tab) ~= "table" then
53-
return false
55+
return
5456
end
5557
for k, v in pairs(tab) do
5658
if type(v) == "table" then

0 commit comments

Comments
 (0)