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