Skip to content

Commit 29d5b86

Browse files
authored
Merge pull request #603 from data-driven-forms/nav-highlight
Add fallback to empty notification response
2 parents a520df0 + 3c4cab5 commit 29d5b86

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)