Skip to content

Commit 5de08f8

Browse files
authored
fix: Dashboard crashes if Parse Server Cloud Function script returns object (#2516)
1 parent 6d2c0cc commit 5de08f8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,10 +1379,8 @@ class Browser extends DashboardView {
13791379
this.setState(prevState => ({
13801380
processedScripts: prevState.processedScripts + 1,
13811381
}));
1382-
this.showNote(
1383-
response ||
1384-
`Ran script "${script.title}" on "${this.props.className}" object "${object.id}".`
1385-
);
1382+
const note = (typeof response === 'object' ? JSON.stringify(response) : response) || `Ran script "${script.title}" on "${object.id}".`;
1383+
this.showNote(note);
13861384
}
13871385
this.refresh();
13881386
} catch (e) {

0 commit comments

Comments
 (0)