From b798f392ad46baf504497a7921160225233efa62 Mon Sep 17 00:00:00 2001 From: kepler155c Date: Tue, 13 Mar 2018 12:27:24 -0400 Subject: [PATCH] 1.7.10 compatibility --- apis/chestAdapter.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apis/chestAdapter.lua b/apis/chestAdapter.lua index 73292fd..34b9ad4 100644 --- a/apis/chestAdapter.lua +++ b/apis/chestAdapter.lua @@ -84,7 +84,7 @@ function ChestAdapter:listItems(throttle) throttle = throttle or Util.throttle() -- getAllStacks sometimes fails - pcall(function() + local s, m = pcall(function() for _,v in pairs(self.getAllStacks(false)) do if v.qty > 0 then convertItem(v) @@ -104,9 +104,13 @@ function ChestAdapter:listItems(throttle) itemDB:flush() end end) - if not Util.empty(items) then - self.cache = cache - return items + if s then + if not Util.empty(items) then + self.cache = cache + return items + end + else + debug(m) end end