From f4a385a6bea0229bbf1ec51b84e9456a4679e749 Mon Sep 17 00:00:00 2001 From: yparitcher Date: Wed, 16 Apr 2025 12:24:53 -0400 Subject: [PATCH] ReaderPaging:getBookLocation() simplify usage of util.tableDeepCopy util.tableDeepCopy always returns a table --- frontend/apps/reader/modules/readerpaging.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/apps/reader/modules/readerpaging.lua b/frontend/apps/reader/modules/readerpaging.lua index 5ce586583..92d37c071 100644 --- a/frontend/apps/reader/modules/readerpaging.lua +++ b/frontend/apps/reader/modules/readerpaging.lua @@ -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