mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Fixed labs not working on posts page initial load
no issue When reloading the posts page, the labs settings wouldn't work. The 'feature' service labs property would try to JSON.parse an undefined labs setting (settings.labs === undefined) because settings wasn't loaded yet. After loading the settings, it wouldn't update because Ember's 'computed' decorator isn't able to watch this. This was all caused by trying to access the emailAnalytics feature in the controller's constructor (this feature doesn't exist any longer). Removing this fixed the issue. We probably need some protection for this in the future.
This commit is contained in:
parent
2bacff028b
commit
1a8f7e6972
1 changed files with 0 additions and 7 deletions
|
@ -76,13 +76,6 @@ export default class PostsController extends Controller {
|
|||
super(...arguments);
|
||||
|
||||
Object.assign(this, DEFAULT_QUERY_PARAMS.posts);
|
||||
|
||||
if (this.feature.emailAnalytics && !this.availableOrders.findBy('name', 'Open rate')) {
|
||||
this.availableOrders.push({
|
||||
name: 'Open rate',
|
||||
value: 'email.open_rate desc'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
get postsInfinityModel() {
|
||||
|
|
Loading…
Reference in a new issue