diff --git a/core/client/app/routes/posts/post.js b/core/client/app/routes/posts/post.js index 96ce8bda2b..f0bfc2611a 100644 --- a/core/client/app/routes/posts/post.js +++ b/core/client/app/routes/posts/post.js @@ -61,6 +61,8 @@ var PostsPostRoute = AuthenticatedRoute.extend(ShortcutsRoute, { actions: { openEditor: function (post) { + post = post || this.get('controller.model'); + if (!post) { return; } diff --git a/core/client/app/templates/posts.hbs b/core/client/app/templates/posts.hbs index 5ee797f23d..7b216f4b1e 100644 --- a/core/client/app/templates/posts.hbs +++ b/core/client/app/templates/posts.hbs @@ -11,7 +11,7 @@ {{#gh-infinite-scroll-box tagName="section" classNames="content-list-content js-content-scrollbox" fetch="loadNextPage"}}
    {{#each sortedPosts key="id" as |post|}} - {{#gh-posts-list-item post=post active=(is-equal post currentPost) previewIsHidden=container.previewIsHidden as |component|}} + {{#gh-posts-list-item post=post active=(is-equal post currentPost) onDoubleClick="openEditor" previewIsHidden=container.previewIsHidden as |component|}} {{#link-to component.viewOrEdit post.id class="permalink" title="Edit this post"}}

    {{post.title}}