MDL-57139 myoverview: fix paging button edge case
authorDan Poltawski <dan@moodle.com>
Wed, 7 Jun 2017 06:21:31 +0000 (07:21 +0100)
committerDan Poltawski <dan@moodle.com>
Wed, 7 Jun 2017 06:21:31 +0000 (07:21 +0100)
Previously the 'view more' button was disabled when should be enabled

blocks/myoverview/amd/build/event_list.min.js
blocks/myoverview/amd/src/event_list.js

index b1db8fe..0d04b59 100644 (file)
Binary files a/blocks/myoverview/amd/build/event_list.min.js and b/blocks/myoverview/amd/build/event_list.min.js differ
index f1d273e..5d1d42d 100644 (file)
@@ -361,7 +361,7 @@ define(['jquery', 'core/notification', 'core/templates',
             // Remember the last id we've seen.
             root.attr('data-last-id', calendarEvents[calendarEvents.length - 1].id);
 
-            if (calendarEvents.length <= limit) {
+            if (calendarEvents.length < limit) {
                 // No more events to load, disable loading button.
                 setLoadedAll(root);
             }