Skip to content

Commit

Permalink
inline the 'fromNow' template call for better rendering performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Rayman committed Oct 11, 2014
1 parent 3dfb7f3 commit 9999154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/views/playlists/playlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ <h4 class="list-group-item-heading">{{snippet.title}}</h4>
{{> userLink}}
{{/each}}
</p>
<p class="meta">Added by {{#with this.author}}{{> userLink}}{{/with}} {{fromNow this.added}}</p>
<p class="meta">Added by {{#with this.author}}{{> userLink}}{{/with}} {{this.addedFromNow}}</p>
</div>

<div class="col-md-2 col-xs-2 controls">
Expand Down
2 changes: 1 addition & 1 deletion client/views/playlists/playlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ Template.songs.songs = function() {

//extra info
song.author = Meteor.users.findOne({_id: entry.author});
song.added = entry.added;
song.addedFromNow = entry.added ? moment(entry.added).fromNow() : "";

return song;
});
Expand Down

0 comments on commit 9999154

Please sign in to comment.