Skip to content

Commit 9d2adc1

Browse files
committed
fixed state handling bug in components
1 parent 3d35f17 commit 9d2adc1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "modular-openscriptjs",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "OpenScriptJs Framework - A lightweight, reactive JavaScript framework for building modern web applications",
55
"type": "module",
66
"main": "./dist/modular-openscriptjs.umd.js",

src/component/Component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export default class Component {
453453

454454
let uuid = this.id;
455455

456-
if (this.states?.length) {
456+
if (this.states && Object.keys(this.states)?.length) {
457457
container.resolve("repository").addComponentArgs(this.id, args ?? []);
458458
}
459459

0 commit comments

Comments
 (0)