ReaderPaging:getBookLocation() simplify usage of util.tableDeepCopy
util.tableDeepCopy always returns a table
This commit is contained in:
1 parent
4816757534
commit
f4a385a6be
1 file changed
+1
-4
@@ -590,10 +590,7 @@ function ReaderPaging:getBookLocation()
|
||||
if ctx then
|
||||
-- We need a copy, as we're getting references to
|
||||
-- objects ReaderPaging/ReaderView may still modify
|
||||
local current_location = {}
|
||||
for i=1, #ctx do
|
||||
current_location[i] = util.tableDeepCopy(ctx[i])
|
||||
end
|
||||
local current_location = util.tableDeepCopy(ctx)
|
||||
return current_location
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user