Automatically switch to the next view
[quicknewsreader] / qml / QuickNewsReader / content / view / NewsDetail.qml
index 049de65..22f60a1 100644 (file)
@@ -9,9 +9,10 @@ Item {
     {
         var newsIndex = listSourceModel[window.currentSourceIndex].currentPath[componentDepth-1]
 
-        if( typeof currentSource.listModels[componentDepth-1].get(newsIndex) != "undefined" )
-            if( typeof currentSource.listModels[componentDepth-1].get(newsIndex)[prop] != "undefined" )
-                return currentSource.listModels[componentDepth-1].get(newsIndex)[prop]
+        if( typeof currentSource.listModels[componentDepth-1] != "undefined" )
+            if( typeof currentSource.listModels[componentDepth-1].get(newsIndex) != "undefined" )
+                if( typeof currentSource.listModels[componentDepth-1].get(newsIndex)[prop] != "undefined" )
+                    return currentSource.listModels[componentDepth-1].get(newsIndex)[prop]
 
         return ""
     }