viewer: prevent useless itemData calls after destroy

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/900/head
Varun Patil 2023-10-29 22:00:53 -07:00
parent a69be6dd16
commit af00252ed4
1 changed files with 1 additions and 0 deletions

View File

@ -688,6 +688,7 @@ export default defineComponent({
// Lazy-generate item data. This is called for each item in the list // Lazy-generate item data. This is called for each item in the list
photoswipe.addFilter('itemData', (itemData, index) => { photoswipe.addFilter('itemData', (itemData, index) => {
if (!this.list) return {};
const { dayIds } = globals; const { dayIds } = globals;
// Once every cycle, refresh the globals // Once every cycle, refresh the globals