Skip to content

Commit

Permalink
Avoid send null messages
Browse files Browse the repository at this point in the history
  • Loading branch information
euskalhenriko committed Jan 29, 2024
1 parent acb4e0a commit a47422f
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,18 @@ public void onMessage(KlabMessage message, IKActorsBehavior.Scope scope) {
action = new ViewAction(this.component = copyComponent(this.initializedComponent));
break;
default:
action = new ViewAction(this.component = setComponent(mess, scope));
ViewComponent ret = setComponent(mess, scope);
if (ret != null) {
action = new ViewAction(this.component = setComponent(mess, scope));
}
}
if (action != null) {
action.setApplicationId(mess.getAppId());
action.setData(getMetadata(mess.getArguments(), scope));
action.setComponentTag(this.getName());
session.getState().updateView(this.component);
session.getMonitor().send(IMessage.MessageClass.ViewActor, IMessage.Type.ViewAction, action);
}
action.setApplicationId(mess.getAppId());
action.setData(getMetadata(mess.getArguments(), scope));
action.setComponentTag(this.getName());
session.getState().updateView(this.component);
session.getMonitor().send(IMessage.MessageClass.ViewActor, IMessage.Type.ViewAction, action);
}
}

Expand Down

0 comments on commit a47422f

Please sign in to comment.