tutuca 0.9.77 → 0.9.78

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.
@@ -2369,6 +2369,7 @@ class ComponentStack {
2369
2369
  for (let i = 0;i < comps.length; i++) {
2370
2370
  const comp = comps[i];
2371
2371
  comp.scope = this.enter();
2372
+ comp.Class.scope = comp.scope;
2372
2373
  this.comps.registerComponent(comp);
2373
2374
  this.byName[comp.name] = comp;
2374
2375
  }
@@ -3820,10 +3821,11 @@ class ClassBuilder {
3820
3821
  this._statics = {
3821
3822
  make: function(inArgs = {}, opts = {}) {
3822
3823
  const args = {};
3824
+ const scope = opts.scope ?? this.scope;
3823
3825
  for (const key in inArgs) {
3824
3826
  const field = fields[key];
3825
3827
  if (compFields.has(key))
3826
- args[key] = mkCompField(field, opts.scope, inArgs[key]);
3828
+ args[key] = mkCompField(field, scope, inArgs[key]);
3827
3829
  else if (field === undefined)
3828
3830
  console.warn("extra argument to constructor:", name, key, inArgs);
3829
3831
  else
@@ -3831,7 +3833,7 @@ class ClassBuilder {
3831
3833
  }
3832
3834
  for (const key of compFields)
3833
3835
  if (args[key] === undefined)
3834
- args[key] = mkCompField(fields[key], opts.scope, inArgs[key]);
3836
+ args[key] = mkCompField(fields[key], scope, inArgs[key]);
3835
3837
  return this(args);
3836
3838
  }
3837
3839
  };