Skip to content

Commit 7461123

Browse files
committed
[push] Fix external drawer
1 parent 2f18ed7 commit 7461123

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

plugins/push/frontend/public/javascripts/countly.views.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,21 @@
731731
}
732732
this.updatePlatformsBasedOnAppConfig();
733733
this.estimateIfNecessary();
734-
this.setEnabledUsers(this.$store.state.countlyPushNotificationDashboard.enabledUsers);
734+
735+
if (this.$store.state.countlyPushNotificationDashboard) {
736+
this.setEnabledUsers(this.$store.state.countlyPushNotificationDashboard.enabledUsers);
737+
}
738+
else {
739+
var self = this;
740+
741+
countlyPushNotification.service.fetchDashboard()
742+
.then(function(response) {
743+
self.setEnabledUsers(response.enabledUsers);
744+
})
745+
.catch(function(error) {
746+
console.error(error);
747+
});
748+
}
735749
},
736750
addButton: function() {
737751
this.pushNotificationUnderEdit.message[this.activeLocalization].buttons.push({label: "", url: ""});
@@ -2906,4 +2920,4 @@
29062920
app.configurationsView.registerLabel("push.proxyport", "push-notification.proxy-port");
29072921
app.configurationsView.registerLabel("push.proxyuser", "push-notification.proxy-user");
29082922
}
2909-
}());
2923+
}());

0 commit comments

Comments
 (0)