FIX: ensures we have outlet args

This commit is contained in:
jjaffeux 2020-04-14 00:19:07 +02:00
parent e48f49a4f1
commit fd179ae2ee
1 changed files with 5 additions and 1 deletions

View File

@ -5,7 +5,11 @@ function initializeEventBuilder(api) {
const currentUser = api.getCurrentUser();
api.onToolbarCreate(toolbar => {
if (!currentUser || !currentUser.can_create_event) {
if (
!currentUser ||
!currentUser.can_create_event ||
!toolbar.context.outletArgs
) {
return;
}