Skip to content

Commit e5a5016

Browse files
drew-grossflovilmart
authored andcommitted
Fix json push (#291)
1 parent d0b77e8 commit e5a5016

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/dashboard/Push/PushNew.react.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ export default class PushNew extends DashboardView {
197197

198198
handlePushSubmit(changes) {
199199
let promise = new Promise();
200-
let payload = {};
201-
payload.alert = changes.data_type === 'json' ? JSON.parse(changes.data) : changes.data;
200+
let payload = changes.data_type === 'json' ? JSON.parse(changes.data) : { alert: changes.data };
202201
if (!!changes.increment_badge) {
203202
payload.badge = "Increment";
204203
}

0 commit comments

Comments
 (0)