Skip to content

Commit

Permalink
isempty
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Oct 25, 2024
1 parent 198060b commit efa8c1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kong/clustering/services/sync/rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ local txn = require("resty.lmdb.transaction")
local declarative = require("kong.db.declarative")
local constants = require("kong.constants")
local concurrency = require("kong.concurrency")
local isempty = require("table.isempty")


local insert_entity_for_txn = declarative.insert_entity_for_txn
Expand Down Expand Up @@ -213,7 +214,7 @@ local function do_sync()
return nil, "default namespace does not exist inside params"
end

if #ns_delta.deltas == 0 then
if isempty(ns_delta.deltas) then
ngx_log(ngx_DEBUG, "no delta to sync")
return true
end
Expand Down

0 comments on commit efa8c1a

Please sign in to comment.