Skip to content

Commit

Permalink
Clean up based on review
Browse files Browse the repository at this point in the history
- Just use .slice()
  • Loading branch information
mofojed committed Nov 9, 2023
1 parent 074990c commit e15c4cf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public String toString() {

private JsChart[] charts;

private String[] errors;
private JsArray<String> errors;

private JsTable[] tables;
private Map<Integer, JsTable> plotHandlesToTables;
Expand Down Expand Up @@ -203,7 +203,7 @@ public Promise<JsFigure> refetch() {
.map(chartDescriptor -> new JsChart(chartDescriptor, this)).toArray(JsChart[]::new);
JsObject.freeze(charts);

errors = JsObject.freeze(descriptor.getErrorsList().asList().toArray(new String[0]));
errors = JsObject.freeze(descriptor.getErrorsList().slice());

return this.tableFetch.fetch(this, response);
}).then(tableFetchData -> {
Expand Down Expand Up @@ -329,7 +329,7 @@ public JsChart[] getCharts() {
}

@JsProperty
public String[] getErrors() {
public JsArray<String> getErrors() {
return errors;
}

Expand Down

0 comments on commit e15c4cf

Please sign in to comment.