[BUGFIX] parseInt values before comparison for Fluid be.widget.paginate
[Packages/TYPO3.CMS.git] / typo3 / sysext / fluid / Resources / Private / Templates / ViewHelpers / Be / Widget / Paginate / Index.html
index 7413352..4c58d7d 100644 (file)
@@ -7,8 +7,8 @@
                function goToPage(formObject) {
                        var formField = formObject.elements['paginator-target-page'];
                        var url = formField.dataset.url;
-                       var numberOfPages = formField.dataset.numberOfPages;
-                       var page = formField.value;
+                       var numberOfPages = parseInt(formField.dataset.numberOfPages);
+                       var page = parseInt(formField.value);
                        if (page > numberOfPages) {
                                page = numberOfPages;
                        } else if (page < 1) {