From a18e5ce9ed63e9275d6927f10dd70794a88ed8d2 Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Fri, 18 Jul 2014 15:01:42 +0000 Subject: [PATCH] Prevent duplicate slug request on saving new post No Issue - Do not run generateSlugPlaceholder if save has been initiated and the title has already been set on the post. At that stage a slug has already been generated and another API call is not necessary. --- core/client/controllers/post-settings-menu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/client/controllers/post-settings-menu.js b/core/client/controllers/post-settings-menu.js index b4d5d7ce05..cba393da0c 100644 --- a/core/client/controllers/post-settings-menu.js +++ b/core/client/controllers/post-settings-menu.js @@ -45,7 +45,7 @@ var PostSettingsMenuController = Ember.ObjectController.extend({ }); }, titleObserver: function () { - if (this.get('isNew')) { + if (this.get('isNew') && !this.get('title')) { Ember.run.debounce(this, 'generateSlugPlaceholder', 700); } },