Skip to content

Commit

Permalink
[REVERT-4398] Fix Check view before adding it to post form
Browse files Browse the repository at this point in the history
  • Loading branch information
amincdev committed May 8, 2024
1 parent dba167e commit 3e33379
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/bp-templates/bp-nouveau/js/buddypress-activity-post-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -3687,7 +3687,10 @@ window.bp = window.bp || {};
this.views.add( new bp.Views.CaseAvatar( { model: this.model } ) );
this.views.add( new bp.Views.CaseHeading( { model: this.model } ) );
this.views.add( new bp.Views.CasePrivacy( { model: this.model } ) );
this.views.add( new bp.Views.PostScheduleTime( { model: this.model } ) );

if( bp.Views.PostScheduleTime !== undefined ) {
this.views.add( new bp.Views.PostScheduleTime( { model: this.model } ) );
}

$( '#whats-new-heading, #whats-new-status' ).wrapAll( '<div class="activity-post-name-status" />' );
setTimeout(
Expand Down Expand Up @@ -4838,7 +4841,10 @@ window.bp = window.bp || {};
value: BP_Nouveau.activity.strings.discardButton
}
));
this.views.add( new bp.Views.activitySchedulePost( { model: this.model } ) );

if( bp.Views.activitySchedulePost !== undefined ) {
this.views.add( new bp.Views.activitySchedulePost( { model: this.model } ) );
}
this.views.add( new bp.Views.FormSubmit( { model: this.model } ) );
}
}
Expand Down

Large diffs are not rendered by default.

0 comments on commit 3e33379

Please sign in to comment.