@whitesev/utils 2.9.1 → 2.9.2

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/index.amd.js CHANGED
@@ -5474,7 +5474,7 @@ define((function () { 'use strict';
5474
5474
  }
5475
5475
  const domUtils = new DOMUtils();
5476
5476
 
5477
- const version = "2.9.1";
5477
+ const version = "2.9.2";
5478
5478
 
5479
5479
  class Utils {
5480
5480
  windowApi;
@@ -8194,10 +8194,12 @@ define((function () { 'use strict';
8194
8194
  }
8195
8195
  createFunction(...args) {
8196
8196
  let isAsync = args[args.length - 1];
8197
- if (typeof isAsync !== "boolean") {
8197
+ if (typeof isAsync === "boolean") {
8198
+ args.splice(args.length - 1, 1);
8199
+ }
8200
+ else {
8198
8201
  isAsync = false;
8199
8202
  }
8200
- args.splice(args.length - 1, 1);
8201
8203
  if (isAsync) {
8202
8204
  const AsyncFunctionConstructor = Object.getPrototypeOf(async function () { }).constructor;
8203
8205
  return new AsyncFunctionConstructor(...args);