Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Tobias Ortmayr <[email protected]>
  • Loading branch information
planger and tortmayr authored May 3, 2023
1 parent e67d502 commit 07c94a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ModelSubmissionHandler {

@inject(ModelValidator)
@optional()
protected validator: ModelValidator;
protected validator?: ModelValidator;

/**
* Returns a list of actions to update the client-side model, based on the specified <code>modelState</code>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class RequestMarkersHandler implements ActionHandler {
elementIDs = [this.modelState.root.id];
}

const modelElements = elementIDs.flatMap(elementId => this.modelState.index.get(elementId));
const modelElements = this.modelState.index.getAll(elementIDs);
const markers = await this.validator.validate(modelElements, action.reason ?? MarkersReason.BATCH);

return [SetMarkersAction.create(markers)];
Expand Down

0 comments on commit 07c94a5

Please sign in to comment.