Commit 514590c2149dc7205c1edd957a3fec5bef915ea8
1 parent
e1679483
容错
Showing
1 changed file
with
7 additions
and
5 deletions
Show diff stats
src/models/RolePlugin.lua
@@ -94,11 +94,13 @@ function RolePlugin.bind(Role) | @@ -94,11 +94,13 @@ function RolePlugin.bind(Role) | ||
94 | local items = self:getProperty("items"):toNumMap() | 94 | local items = self:getProperty("items"):toNumMap() |
95 | for id ,_ in pairs(items) do | 95 | for id ,_ in pairs(items) do |
96 | local tempData = csvdb["itemCsv"][id] | 96 | local tempData = csvdb["itemCsv"][id] |
97 | - if globalCsv.store_type[tempData.type] == page then | ||
98 | - curCount = curCount + 1 | ||
99 | - if curCount >= limit then | ||
100 | - count = 0 | ||
101 | - break | 97 | + if tempData then |
98 | + if globalCsv.store_type[tempData.type] == page then | ||
99 | + curCount = curCount + 1 | ||
100 | + if curCount >= limit then | ||
101 | + count = 0 | ||
102 | + break | ||
103 | + end | ||
102 | end | 104 | end |
103 | end | 105 | end |
104 | end | 106 | end |