Skip to content

Commit

Permalink
fix: Dashboard crashes if Parse Server Cloud Function script returns …
Browse files Browse the repository at this point in the history
…object (#2516)
  • Loading branch information
mtrezza authored Dec 16, 2023
1 parent 6d2c0cc commit 5de08f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dashboard/Data/Browser/Browser.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -1379,10 +1379,8 @@ class Browser extends DashboardView {
this.setState(prevState => ({
processedScripts: prevState.processedScripts + 1,
}));
this.showNote(
response ||
`Ran script "${script.title}" on "${this.props.className}" object "${object.id}".`
);
const note = (typeof response === 'object' ? JSON.stringify(response) : response) || `Ran script "${script.title}" on "${object.id}".`;
this.showNote(note);
}
this.refresh();
} catch (e) {
Expand Down

0 comments on commit 5de08f8

Please sign in to comment.