make sure ReaderLink gets a deep copy of location

Fixes: #7922
This commit is contained in:
yparitcher committed 2021-07-04 21:45:19 -04:00
1 parent 246b402d9c
commit b07414c2b5
2 files changed
+13 -11

No files matched your search

+1 -10
View File
@@ -32,16 +32,7 @@ end
function ReaderBack:_getCurrentLocation()
if self.ui.document.info.has_pages then
local current_location = self.ui.paging:getBookLocation()
if current_location then
-- We need a copy, as we're getting references to
-- objects ReaderPaging/ReaderView may still modify
local res = {}
for i=1, #current_location do
res[i] = util.tableDeepCopy(current_location[i])
end
return res
end
return self.ui.paging:getBookLocation()
else
return {
xpointer = self.ui.rolling:getBookLocation(),