Skip to content

Commit b8d7b32

Browse files
committed
Update: Oauth redirect will now change with bowerLocation property.
1 parent d422820 commit b8d7b32

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

api-console-request.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@
214214
* Location of the `bower_components` folder.
215215
* It should be a path from server's root path including bower_components.
216216
*/
217-
bowerLocation: String,
217+
bowerLocation: {
218+
type: String,
219+
observer: '_updateRedirectUrl'
220+
},
218221
/**
219222
* Hides the URL editor from the view.
220223
* Note that the editor is still in the DOM. This property just hiddes
@@ -228,13 +231,14 @@
228231
},
229232

230233
ready: function() {
231-
this._setRedirectUrl();
234+
if (!this.redirectUrl) {
235+
this._updateRedirectUrl(this.bowerLocation);
236+
}
232237
this._initExtensionBanner();
233238
},
234239
// Sets OAuth 2 redirect URL for the authorization panel
235-
_setRedirectUrl: function() {
240+
_updateRedirectUrl: function(location) {
236241
var a = document.createElement('a');
237-
var location = this.bowerLocation;
238242
if (!location) {
239243
location = 'bower_components/';
240244
}

0 commit comments

Comments
 (0)