Skip to content

Commit 9db76df

Browse files
committed
0.8.0
1 parent dc97eea commit 9db76df

10 files changed

+17
-40
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cross-storage",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "Cross domain local storage",
55
"license": "Apache-2.0",
66
"authors": [

dist/client.js

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* cross-storage - Cross domain local storage
33
*
4-
* @version 0.7.0
4+
* @version 0.8.0
55
* @link https://github.com/zendesk/cross-storage
66
* @author Daniel St. Jules <[email protected]>
77
* @copyright Zendesk
@@ -14,7 +14,7 @@
1414
* an iframe is created within the document body that points to the url. It
1515
* also accepts an options object, which may include a timeout, frameId, and
1616
* promise. The timeout, in milliseconds, is applied to each request and
17-
* defaults to 3000ms. The options object may also include a frameId,
17+
* defaults to 5000ms. The options object may also include a frameId,
1818
* identifying an existing frame on which to install its listeners. If the
1919
* promise key is supplied the constructor for a Promise, that Promise library
2020
* will be used instead of the default window.Promise.
@@ -56,7 +56,7 @@
5656
this._connected = false;
5757
this._closed = false;
5858
this._count = 0;
59-
this._timeout = opts.timeout || 3000;
59+
this._timeout = opts.timeout || 5000;
6060
this._listener = null;
6161

6262
this._installListener();
@@ -276,10 +276,12 @@
276276
this._listener = function(message) {
277277
var i, error, response;
278278

279-
if (client._closed) return;
280-
281-
// Ignore messages not from our hub
282-
if (message.origin !== client._origin) return;
279+
// Ignore invalid messages, those not from the correct hub, or when
280+
// the client has closed
281+
if (client._closed || !message.data || typeof message.data !== 'string' ||
282+
message.origin !== client._origin) {
283+
return;
284+
}
283285

284286
// LocalStorage isn't available in the hub
285287
if (message.data === 'cross-storage:unavailable') {

dist/client.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hub.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* cross-storage - Cross domain local storage
33
*
4-
* @version 0.7.0
4+
* @version 0.8.0
55
* @link https://github.com/zendesk/cross-storage
66
* @author Daniel St. Jules <[email protected]>
77
* @copyright Zendesk

dist/hub.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

-14
This file was deleted.

dist/index.min.js

-11
This file was deleted.

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var banner = [
1919
].join('\n');
2020

2121
var paths = {
22-
scripts: './lib/*.js',
22+
scripts: ['./lib/client.js', './lib/hub.js'],
2323
dist: './dist/'
2424
};
2525

lib/client.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268

269269
// Ignore invalid messages, those not from the correct hub, or when
270270
// the client has closed
271-
if (client._closed || !message.data || !message.data.indexOf ||
271+
if (client._closed || !message.data || typeof message.data !== 'string' ||
272272
message.origin !== client._origin) {
273273
return;
274274
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cross-storage",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "Cross domain local storage",
55
"keywords": [
66
"local",

0 commit comments

Comments
 (0)