File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- require ( 'babel-polyfill' ) ;
1+ if ( ! global . _babelPolyfill ) { require ( 'babel-polyfill' ) ; }
22
33import _ from 'lodash' ;
44import Proto from 'uberproto' ;
@@ -35,10 +35,10 @@ class Service {
3535 }
3636
3737 if ( filters . $skip ) {
38- values = values . slice ( parseInt ( filters . $skip , 10 ) ) ;
38+ values = values . slice ( filters . $skip ) ;
3939 }
4040
41- let limit = parseInt ( filters . $limit || this . paginate . default , 10 ) ;
41+ let limit = filters . $limit || this . paginate . default ;
4242
4343 if ( limit ) {
4444 limit = Math . min ( this . paginate . max || Number . MAX_VALUE , limit ) ;
@@ -53,7 +53,7 @@ class Service {
5353 return Promise . resolve ( {
5454 total,
5555 limit,
56- skip : parseInt ( filters . $skip || 0 , 10 ) ,
56+ skip : filters . $skip || 0 ,
5757 data : values
5858 } ) ;
5959 }
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ export function sorter($sort) {
5656 return ( first , second ) => {
5757 let comparator = 0 ;
5858 _ . each ( $sort , ( modifier , key ) => {
59+ modifier = parseInt ( modifier , 10 ) ;
60+
5961 if ( first [ key ] < second [ key ] ) {
6062 comparator -= 1 * modifier ;
6163 }
You can’t perform that action at this time.
0 commit comments