@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.js CHANGED
@@ -1007,9 +1007,11 @@ function use$1(input, argument) {
1007
1007
  let pending;
1008
1008
  let error;
1009
1009
  let get = (_local) => state.get(key);
1010
- if (typeof input === "function")
1011
- input = /^[A-Z]/.test(input.name)
1012
- ? new input() : input;
1010
+ if (typeof input === "function") {
1011
+ if ("prototype" in input &&
1012
+ input === input.prototype.constructor)
1013
+ input = new input();
1014
+ }
1013
1015
  else if (input && typeof input !== "object")
1014
1016
  throw Oops$6.BadArgument(typeof input);
1015
1017
  if (input instanceof Map || input instanceof Set)