Skip to content

Commit 7c9d054

Browse files
Hyperkid123rvsia
authored andcommitted
Add fallback to empty notification response
1 parent 4cf428a commit 7c9d054

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-renderer-demo/src/components/notification-panel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ const getNotifications = () => {
4141
return fetch(`https://data-driven-forms.firebaseio.com/notifications.json${query}`)
4242
.then((data) => data.json())
4343
.then((data) => {
44+
if (!data) {
45+
return [];
46+
}
47+
4448
if (typeof data !== 'object') {
4549
return [];
4650
}

0 commit comments

Comments
 (0)