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

Set 'value' property before a dependent CP is used

No issue.
- Make sure value property has been set before computed
  property isRelative is referenced.
This commit is contained in:
Jason Williams 2015-01-27 21:16:40 +00:00
parent 42b0f3ebed
commit e4c67f1502

View file

@ -27,13 +27,13 @@ var NavItemUrlInputComponent = Ember.TextField.extend({
var url = this.get('url'), var url = this.get('url'),
baseUrl = this.get('baseUrl'); baseUrl = this.get('baseUrl');
this.set('value', url);
// if we have a relative url, create the absolute url to be displayed in the input // if we have a relative url, create the absolute url to be displayed in the input
if (this.get('isRelative')) { if (this.get('isRelative')) {
url = joinUrlParts(baseUrl, url); url = joinUrlParts(baseUrl, url);
this.set('value', url);
} }
this.set('value', url);
this.sendAction('change', this.get('value'));
}, },
focusIn: function (event) { focusIn: function (event) {