Skip to content

Commit

Permalink
Use toString() for error
Browse files Browse the repository at this point in the history
  • Loading branch information
cynicaloptimist committed Aug 2, 2024
1 parent b4c3748 commit 1dc8459
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions client/StatBlockEditor/StatBlockEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class StatBlockEditor extends React.Component<
public componentDidCatch(error, info) {
this.setState({
editorMode: "json",
renderError: JSON.stringify(error)
renderError: error.toString()
});
}

Expand All @@ -74,9 +74,17 @@ export class StatBlockEditor extends React.Component<

const buttons = (
<>
<Button onClick={this.close} fontAwesomeIcon="times" tooltip="Close Editor" />
<Button
onClick={this.close}
fontAwesomeIcon="times"
tooltip="Close Editor"
/>
{this.props.onDelete && (
<Button onClick={this.delete} fontAwesomeIcon="trash" tooltip="Delete StatBlock" />
<Button
onClick={this.delete}
fontAwesomeIcon="trash"
tooltip="Delete StatBlock"
/>
)}
<SubmitButton fontAwesomeIcon="save" tooltip="Save Changes" />
</>
Expand Down

0 comments on commit 1dc8459

Please sign in to comment.