@@ -101,18 +101,26 @@ Item {
101101
102102 isCurrent: ListView.isCurrentItem
103103
104− previewModel: {
104+ readonly property var previewStack: {
105105 if (root.open) {
106106 if (index === root.initialIndex) {
107− return root.initialIndexPreviewStack.getPreviewModel(0);
107+ return root.initialIndexPreviewStack;
108108 } else {
109− var previewStack = root.scope.preview(result, root.categoryId);
110− return previewStack.getPreviewModel(0);
109+ return root.scope.preview(result, root.categoryId);
111110 }
112111 } else {
113112 return null;
114113 }
115114 }
115+
116+ previewModel: {
117+ if (previewStack) {
118+ return previewStack.getPreviewModel(0);
119+ } else {
120+ return null;
121+ }
122+ }
123+
116124 scopeStyle: root.scopeStyle
117125 }
118126 }