Skip to content

Commit ebb8176

Browse files
committed
0.5.1
1 parent 2df441d commit ebb8176

6 files changed

Lines changed: 13 additions & 8 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cross-storage",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Cross domain local storage",
55
"license": "Apache-2.0",
66
"authors": [

dist/client.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* cross-storage - Cross domain local storage
33
*
4-
* @version 0.5.0
4+
* @version 0.5.1
55
* @link https://github.com/zendesk/cross-storage
66
* @author Daniel St. Jules <danielst.jules@gmail.com>
77
* @copyright Zendesk
@@ -93,7 +93,8 @@ CrossStorageClient.frameStyle = {
9393
* Returns the origin of an url, with cross browser support. Accommodates
9494
* the lack of location.origin in IE, as well as the discrepancies in the
9595
* inclusion of the port when using the default port for a protocol, e.g.
96-
* 443 over https.
96+
* 443 over https. Defaults to the origin of window.location if passed a
97+
* relative path.
9798
*
9899
* @param {string} url The url to a cross storage hub
99100
* @returns {string} The origin of the url
@@ -104,6 +105,10 @@ CrossStorageClient._getOrigin = function(url) {
104105
uri = document.createElement('a');
105106
uri.href = url;
106107

108+
if (!uri.host) {
109+
uri = window.location;
110+
}
111+
107112
origin = uri.protocol + '//' + uri.host;
108113
origin = origin.replace(/:80$|:443$/, '');
109114

dist/client.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hub.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* cross-storage - Cross domain local storage
33
*
4-
* @version 0.5.0
4+
* @version 0.5.1
55
* @link https://github.com/zendesk/cross-storage
66
* @author Daniel St. Jules <danielst.jules@gmail.com>
77
* @copyright Zendesk

dist/hub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cross-storage",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Cross domain local storage",
55
"keywords": [
66
"local",

0 commit comments

Comments
 (0)