FIX: revision history broken for anon

This commit is contained in:
Régis Hanol 2015-08-23 19:56:03 +02:00
parent d418c4cfc0
commit 1b385bba2f

View file

@ -61,12 +61,12 @@ export default Ember.Controller.extend(ModalFunctionality, {
@computed('model.previous_hidden')
displayShow(prevHidden) {
return prevHidden && this.currentUser.get('staff');
return prevHidden && this.currentUser && this.currentUser.get('staff');
},
@computed('model.previous_hidden')
displayHide(prevHidden) {
return !prevHidden && this.currentUser.get('staff');
return !prevHidden && this.currentUser && this.currentUser.get('staff');
},
isEitherRevisionHidden: Ember.computed.or("model.previous_hidden", "model.current_hidden"),