@expressive/mvc 0.6.2 → 0.6.3

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/lib/index.esm.js CHANGED
@@ -999,9 +999,11 @@ function use$1(input, argument) {
999
999
  let pending;
1000
1000
  let error;
1001
1001
  let get = (_local) => state.get(key);
1002
- if (typeof input === "function")
1003
- input = /^[A-Z]/.test(input.name)
1004
- ? new input() : input;
1002
+ if (typeof input === "function") {
1003
+ if ("prototype" in input &&
1004
+ input === input.prototype.constructor)
1005
+ input = new input();
1006
+ }
1005
1007
  else if (input && typeof input !== "object")
1006
1008
  throw Oops$6.BadArgument(typeof input);
1007
1009
  if (input instanceof Map || input instanceof Set)