Fixed "View post" rather than "View page" in save notifications

no issue

- the post/page conditional was looking at the old `post.page` property rather than the `post.displayName` that was added when posts and pages became separate models
This commit is contained in:
Kevin Ansfield 2020-06-30 15:07:35 +01:00
parent 9906fe6800
commit 0a2530c1cc

View File

@ -812,7 +812,7 @@ export default Controller.extend({
let actions, type, path; let actions, type, path;
if (status === 'published' || status === 'scheduled') { if (status === 'published' || status === 'scheduled') {
type = this.get('post.page') ? 'Page' : 'Post'; type = this.get('post.displayName') === 'page' ? 'Page' : 'Post';
path = this.get('post.url'); path = this.get('post.url');
actions = `<a href="${path}" target="_blank">View ${type}</a>`; actions = `<a href="${path}" target="_blank">View ${type}</a>`;
} else { } else {