[appIcon] Fix reference error when favoriting an app

This commit is contained in:
Colin Walters 2009-10-20 18:49:15 -04:00
parent a336ed79ae
commit bda7d3994b

View File

@ -557,7 +557,8 @@ AppIconMenu.prototype = {
this._source.app.launch();
this.emit('activate-window', null);
} else if (child == this._toggleFavoriteMenuItem) {
let isFavorite = AppFavorites.getAppFavorites().isFavorite(this._source.app.get_id());
let favs = AppFavorites.getAppFavorites();
let isFavorite = favs.isFavorite(this._source.app.get_id());
if (isFavorite)
favs.removeFavorite(this._source.app.get_id());
else