FIX: '@observes' doesn't work that way

This commit is contained in:
Régis Hanol 2015-09-08 10:34:36 +02:00
parent 202e30097f
commit 113cb4d3ad
2 changed files with 4 additions and 4 deletions

View File

@ -17,8 +17,8 @@ export default Ember.Component.extend(StringBuffer, {
good: Ember.computed.not("bad"),
@observes("shownAt")
bounce(shownAt) {
if (shownAt) {
bounce() {
if (this.get("shownAt")) {
var $elem = this.$();
if (!this.animateAttribute) {
this.animateAttribute = $elem.css('left') === 'auto' ? 'right' : 'left';

View File

@ -18,8 +18,8 @@ export default Ember.Component.extend({
showDisableAnon(allowAnon, isAnon) { return allowAnon && isAnon; },
@observes('visible')
_loadNotifications(visible) {
if (visible) {
_loadNotifications() {
if (this.get("visible")) {
this.refreshNotifications();
}
},