From 4e8dc4f6e31cb33aa944f5236371365111d55aab Mon Sep 17 00:00:00 2001 From: Andrew Chilton Date: Fri, 23 Jan 2015 17:34:31 +1300 Subject: [PATCH] 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 --- core/client/components/gh-url-preview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/client/components/gh-url-preview.js b/core/client/components/gh-url-preview.js index 2a3d29e3fd..05754803b6 100644 --- a/core/client/components/gh-url-preview.js +++ b/core/client/components/gh-url-preview.js @@ -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')