summaryrefslogtreecommitdiff
path: root/addons/web_unsplash/static/src/js/unsplashapi.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_unsplash/static/src/js/unsplashapi.js')
-rw-r--r--addons/web_unsplash/static/src/js/unsplashapi.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/addons/web_unsplash/static/src/js/unsplashapi.js b/addons/web_unsplash/static/src/js/unsplashapi.js
index a6ec5b75324..3055ec306e8 100644
--- a/addons/web_unsplash/static/src/js/unsplashapi.js
+++ b/addons/web_unsplash/static/src/js/unsplashapi.js
@@ -27,12 +27,11 @@ var UnsplashCore = Class.extend(Mixins.EventDispatcherMixin, ServicesMixin, {
*
* @param {String} query search terms
* @param {Integer} pageSize number of image to display per page
- * @param {Integer} pageNumber page number to retrieve
*/
- getImages: function (query, pageSize, pageNumber) {
+ getImages: function (query, pageSize) {
var self = this;
- var to = pageSize * pageNumber;
- var from = to - pageSize;
+ var from = 0;
+ var to = pageSize;
var cachedData = this._cache[query];
if (cachedData && (cachedData.images.length >= to || (cachedData.totalImages !== 0 && cachedData.totalImages < to))) {