viewer: prevent useless itemData calls after destroy
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/900/head
parent
a69be6dd16
commit
af00252ed4
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue