0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed open rate appearing twice in posts ordering dropdown

no issue

- sometimes the controller's init method can be triggered twice so a guard was added to ensure we're not re-adding the same option
This commit is contained in:
Kevin Ansfield 2020-12-10 15:13:59 +00:00
parent e4c4237365
commit ca956981c3

View file

@ -70,7 +70,7 @@ export default Controller.extend({
this.availableVisibilities = VISIBILITIES;
this.setProperties(DEFAULT_QUERY_PARAMS.posts);
if (this.feature.get('emailAnalytics')) {
if (this.feature.get('emailAnalytics') && !this.availableOrders.findBy('name', 'Open rate')) {
this.availableOrders.push({
name: 'Open rate',
value: 'email.open_rate desc'