skapi-js 0.0.43 → 0.0.46

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": "skapi-js",
3
- "version": "0.0.43",
3
+ "version": "0.0.46",
4
4
  "description": "skapi serverless cloud javascript library",
5
5
  "main": "./dist/skapi.module.js",
6
6
  "scripts": {
package/src/skapi.ts CHANGED
@@ -1112,12 +1112,10 @@ export default class Skapi {
1112
1112
  }): string | FetchResponse {
1113
1113
 
1114
1114
  let { params = {}, url, refresh = false } = option || {};
1115
-
1116
- if (params.hasOwnProperty('startKey')) {
1115
+ if (params.hasOwnProperty('startKey') && params.startKey) {
1117
1116
  if (
1118
- typeof params.startKey !== 'object' && !Object.keys(params.startKey).length ||
1119
- // params.startKey !== 'start' && params.startKey !== 'end'
1120
- params.startKey !== 'end'
1117
+ typeof params.startKey !== 'object' && !Object.keys(params.startKey).length &&
1118
+ params.startKey !== 'start' && params.startKey !== 'end'
1121
1119
  ) {
1122
1120
  throw new SkapiError(`"${params.startKey}" is invalid startKey key.`, { code: 'INVALID_PARAMETER' });
1123
1121
  }