dexie 4.0.1-beta.10 → 4.0.1-beta.11

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/dist/dexie.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 4.0.1-beta.10, Mon Feb 12 2024
7
+ * Version 4.0.1-beta.11, Fri Feb 16 2024
8
8
  *
9
9
  * https://dexie.org
10
10
  *
package/dist/dexie.js CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * By David Fahlander, david.fahlander@gmail.com
6
6
  *
7
- * Version 4.0.1-beta.10, Mon Feb 12 2024
7
+ * Version 4.0.1-beta.11, Fri Feb 16 2024
8
8
  *
9
9
  * https://dexie.org
10
10
  *
@@ -1150,7 +1150,7 @@
1150
1150
  }
1151
1151
  }
1152
1152
 
1153
- var DEXIE_VERSION = '4.0.1-beta.10';
1153
+ var DEXIE_VERSION = '4.0.1-beta.11';
1154
1154
  var maxString = String.fromCharCode(65535);
1155
1155
  var minKey = -Infinity;
1156
1156
  var INVALID_KEY_ARGUMENT = "Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.";
@@ -5388,7 +5388,7 @@
5388
5388
  Dexie.prototype.delete = function (closeOptions) {
5389
5389
  var _this = this;
5390
5390
  if (closeOptions === void 0) { closeOptions = { disableAutoOpen: true }; }
5391
- var hasArguments = arguments.length > 0;
5391
+ var hasInvalidArguments = arguments.length > 0 && typeof arguments[0] !== 'object';
5392
5392
  var state = this._state;
5393
5393
  return new DexiePromise(function (resolve, reject) {
5394
5394
  var doDelete = function () {
@@ -5401,8 +5401,8 @@
5401
5401
  req.onerror = eventRejectHandler(reject);
5402
5402
  req.onblocked = _this._fireOnBlocked;
5403
5403
  };
5404
- if (hasArguments)
5405
- throw new exceptions.InvalidArgument("Arguments not allowed in db.delete()");
5404
+ if (hasInvalidArguments)
5405
+ throw new exceptions.InvalidArgument("Invalid closeOptions argument to db.delete()");
5406
5406
  if (state.isBeingOpened) {
5407
5407
  state.dbReadyPromise.then(doDelete);
5408
5408
  }