MDL-58835 report_insights: Fix redirections
[moodle.git] / report / insights / amd / src / actions.js
index 2ffe7f2..bc10ce2 100644 (file)
@@ -56,7 +56,7 @@ define(['jquery', 'core/ajax', 'core/notification'], function($, Ajax, Notificat
                         predictionContainers[0].remove();
 
                         // Move back if no remaining predictions.
                         predictionContainers[0].remove();
 
                         // Move back if no remaining predictions.
-                        if ($('.insights-list tr').length === 0) {
+                        if ($('.insights-list tr').length < 2) {
                             window.history.back();
                         }
                     }).fail(Notification.exception);
                             window.history.back();
                         }
                     }).fail(Notification.exception);