vasille 5.1.0 → 5.1.1

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/node/node.js CHANGED
@@ -263,11 +263,12 @@ export class SwitchedNode extends Fragment {
263
263
  }
264
264
  if (i !== -1) {
265
265
  const node = this.newChild(i);
266
+ const value = this.cases[i].$case;
266
267
  node.parent = this;
267
268
  this.lastChild = node;
268
269
  this.children.add(node);
269
270
  this.index = i;
270
- safe(this.cases[i].slot)(node);
271
+ safe(this.cases[i].slot)(node, value instanceof IValue ? value.V : value);
271
272
  }
272
273
  else {
273
274
  this.index = -1;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "The same framework which is designed to build bulletproof frontends (core library).",
4
4
  "main": "lib/index.js",
5
5
  "types": "types/index.d.ts",
6
- "version": "5.1.0",
6
+ "version": "5.1.1",
7
7
  "exports": {
8
8
  ".": {
9
9
  "types": "./types/index.d.ts",
@@ -131,7 +131,7 @@ export declare abstract class Tag<Node, Element, TagOptions extends object, Runn
131
131
  }
132
132
  export interface SwitchedNodeCase<Node, Element, TagOptions extends object, Runner extends IRunner<Node, Element, TagOptions>> {
133
133
  $case: unknown;
134
- slot: (node: Fragment<Node, Element, TagOptions, Runner>) => void;
134
+ slot: (node: Fragment<Node, Element, TagOptions, Runner>, value?: unknown) => void;
135
135
  }
136
136
  /**
137
137
  * Defines a node which can switch its children conditionally