Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle relative URLs in IE #72

Merged
merged 1 commit into from
Jan 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/ember-simple-auth/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ Ember.SimpleAuth = Ember.Namespace.create({
var link = this._linkOrigins[url] || function() {
var link = document.createElement('a');
link.href = url;
//IE requires the following line when url is relative.
//First assignment of relative url to link.href results in absolute url on link.href but link.hostname and other properties are not set
//Second assignment of absolute url to link.href results in link.hostname and other properties being set as expected
link.href = link.href;
return (this._linkOrigins[url] = link);
}.apply(this);
var linkOrigin = extractLocationOrigin(link);
Expand Down