0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Make preview URLs include trailing slash when slug is given

- the trailing slash isn't shown usually
- slash added when a slug is given to be more correct
This commit is contained in:
Andrew Chilton 2015-01-23 17:34:31 +13:00
parent 2c1d662517
commit 4e8dc4f6e3

View file

@ -18,7 +18,7 @@ var urlPreview = Ember.Component.extend({
slug = this.get('slug') ? this.get('slug') : '',
// Join parts of the URL together with slashes
theUrl = noSchemeBlogUrl + '/' + prefix + slug;
theUrl = noSchemeBlogUrl + '/' + prefix + (slug ? slug + '/' : '');
this.set('the-url', theUrl);
}.on('didInsertElement').observes('slug')