@onehat/data 1.8.26 → 1.8.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.8.26",
3
+ "version": "1.8.28",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/OneHatData.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  MODE_LOCAL_MIRROR,
7
7
  MODE_COMMAND_QUEUE,
8
8
  MODE_REMOTE_WITH_OFFLINE,
9
- } from './Repository/LocalFromRemote/LocalFromRemote/index.js';
9
+ } from './Repository/LocalFromRemote/index.js';
10
10
  import {
11
11
  default as Schema,
12
12
  CoreSchemas,
@@ -740,7 +740,7 @@ export default class Repository extends EventEmitter {
740
740
  * Resets the pagination to page one
741
741
  * @fires changePageSize
742
742
  */
743
- resetPagination = (pageSize) => {
743
+ resetPagination = () => {
744
744
  if (this.isDestroyed) {
745
745
  throw Error('this.resetPagination is no longer valid. Repository has been destroyed.');
746
746
  }
@@ -758,11 +758,13 @@ export default class Repository extends EventEmitter {
758
758
  if (!this.isPaginated) {
759
759
  return false;
760
760
  }
761
+
762
+ pageSize = parseInt(pageSize, 10);
761
763
  if (_.isEqual(this.pageSize, pageSize)) {
762
764
  return false;
763
765
  }
764
766
 
765
- // Reset to page 1
767
+ // Reset to page 1 (don't use setPage(), so we can skip _onChangePagination, which we'll do later)
766
768
  this.page = 1;
767
769
  this.emit('changePage');
768
770