Skip to content

Commit

Permalink
Merge pull request #2 from lionix-team/v2.0.1
Browse files Browse the repository at this point in the history
small fixings
  • Loading branch information
GHarutyunyan authored Aug 5, 2019
2 parents 1677fe1 + 7a0db42 commit 09df350
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-laravel-paginex",
"version": "2.0.0",
"version": "2.0.1",
"description": "Laravel Pagination with ReactJS (customizable)",
"main": "dist/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/Pagination.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class Pagination extends Component {
let pagination = (<div></div>);
if (Object.keys(paginationData).length) {
let options = this.state.options;
let current = paginationData.current_page ? paginationData.current_page : paginationData.meta.current_page,
last = paginationData.last_page ? paginationData.last_page : paginationData.meta.last_page,
let current = paginationData.hasOwnProperty('current_page') ? paginationData.current_page : paginationData.meta.current_page,
last = paginationData.hasOwnProperty('last_page') ? paginationData.last_page : paginationData.meta.last_page,
delta = parseInt(options.numbersCountForShow),
left = current - delta,
right = current + delta + 1,
Expand All @@ -81,8 +81,8 @@ class Pagination extends Component {
l = i;
}

let nextPageUrl = paginationData.next_page_url ? paginationData.next_page_url : paginationData.meta.next_page_url;
let prevPageUrl = paginationData.prev_page_url ? paginationData.prev_page_url : paginationData.meta.prev_page_url;
let nextPageUrl = paginationData.hasOwnProperty('next_page_url') ? paginationData.next_page_url : paginationData.links.next;
let prevPageUrl = paginationData.hasOwnProperty('prev_page_url') ? paginationData.prev_page_url : paginationData.links.prev;
pagination = (
<ul className={options.containerClass}>
{prevPageUrl ?
Expand Down

0 comments on commit 09df350

Please sign in to comment.