ReaderPaging:getBookLocation() simplify usage of util.tableDeepCopy

util.tableDeepCopy always returns a table
This commit is contained in:
yparitcher
2025-04-16 12:24:53 -04:00
parent 4816757534
commit f4a385a6be

View File

@@ -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