Skip to content

Commit

Permalink
Bump version for 1.5.7 hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
thgreasi committed Feb 23, 2018
1 parent aea1913 commit c0356e8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -25,5 +25,5 @@
"assert": "~0.1.0",
"modernizr": "~2.8.1"
},
"version": "1.5.6"
"version": "1.5.7"
}
2 changes: 1 addition & 1 deletion component.json
@@ -1,6 +1,6 @@
{
"name": "localforage",
"version": "1.5.6",
"version": "1.5.7",
"dependencies": {
"then/promise": "5.0.0"
},
Expand Down
18 changes: 10 additions & 8 deletions dist/localforage.js
@@ -1,6 +1,6 @@
/*!
localForage -- Offline Storage, Improved
Version 1.5.6
Version 1.5.7
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/
Expand Down Expand Up @@ -90,7 +90,7 @@ var REJECTED = ['REJECTED'];
var FULFILLED = ['FULFILLED'];
var PENDING = ['PENDING'];

module.exports = exports = Promise;
module.exports = Promise;

function Promise(resolver) {
if (typeof resolver !== 'function') {
Expand Down Expand Up @@ -196,7 +196,7 @@ handlers.reject = function (self, error) {
function getThen(obj) {
// Make sure we only access the accessor once as required by the spec
var then = obj && obj.then;
if (obj && typeof obj === 'object' && typeof then === 'function') {
if (obj && (typeof obj === 'object' || typeof obj === 'function') && typeof then === 'function') {
return function appyThen() {
then.apply(obj, arguments);
};
Expand Down Expand Up @@ -244,21 +244,21 @@ function tryCatch(func, value) {
return out;
}

exports.resolve = resolve;
Promise.resolve = resolve;
function resolve(value) {
if (value instanceof this) {
return value;
}
return handlers.resolve(new this(INTERNAL), value);
}

exports.reject = reject;
Promise.reject = reject;
function reject(reason) {
var promise = new this(INTERNAL);
return handlers.reject(promise, reason);
}

exports.all = all;
Promise.all = all;
function all(iterable) {
var self = this;
if (Object.prototype.toString.call(iterable) !== '[object Array]') {
Expand Down Expand Up @@ -297,7 +297,7 @@ function all(iterable) {
}
}

exports.race = race;
Promise.race = race;
function race(iterable) {
var self = this;
if (Object.prototype.toString.call(iterable) !== '[object Array]') {
Expand Down Expand Up @@ -1808,7 +1808,9 @@ var webSQLStorage = {

function isLocalStorageValid() {
try {
return typeof localStorage !== 'undefined' && 'setItem' in localStorage && typeof localStorage.setItem === 'function';
return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&
// in IE8 typeof localStorage.setItem === 'object'
!!localStorage.setItem;
} catch (e) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions dist/localforage.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions dist/localforage.nopromises.js
@@ -1,6 +1,6 @@
/*!
localForage -- Offline Storage, Improved
Version 1.5.6
Version 1.5.7
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/
Expand Down Expand Up @@ -1472,7 +1472,9 @@ var webSQLStorage = {

function isLocalStorageValid() {
try {
return typeof localStorage !== 'undefined' && 'setItem' in localStorage && typeof localStorage.setItem === 'function';
return typeof localStorage !== 'undefined' && 'setItem' in localStorage &&
// in IE8 typeof localStorage.setItem === 'object'
!!localStorage.setItem;
} catch (e) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions dist/localforage.nopromises.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -9,7 +9,7 @@
"storage",
"websql"
],
"version": "1.5.6",
"version": "1.5.7",
"homepage": "https://github.com/localForage/localForage",
"repository": {
"type": "git",
Expand Down

0 comments on commit c0356e8

Please sign in to comment.