diff --git a/CHANGES.md b/CHANGES.md index 5c8eaf14..d2b72a6e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,13 @@ +### 3.7.5 + +* Improve unhandled rejection formatting in ie8 + +### 3.7.4 + +* Add `when/keys settle`, for settling a hash of promises. +* Use `poly` from npm instead of a git link in package.json. No need for git to be available to npm install when. +* Various community-contributed documentation updates. Thanks! + ### 3.7.3 * Fix console.log check when using `monitor/console` in IE8. diff --git a/es6-shim/Promise.js b/es6-shim/Promise.js index e97f1aa6..5770829a 100644 --- a/es6-shim/Promise.js +++ b/es6-shim/Promise.js @@ -299,7 +299,7 @@ define(function() { * @returns {String} formatted string, suitable for output to developers */ function formatError(e) { - var s = typeof e === 'object' && e !== null && e.stack ? e.stack : formatObject(e); + var s = typeof e === 'object' && e !== null && (e.stack || e.message) ? e.stack || e.message : formatObject(e); return e instanceof Error ? s : s + ' (WARNING: non-Error used)'; } diff --git a/package.json b/package.json index 901f02e1..e4bec531 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "when", - "version": "3.7.4", + "version": "3.7.5", "description": "A lightweight Promises/A+ and when() implementation, plus other async goodies.", "keywords": [ "cujo", @@ -84,6 +84,8 @@ "tunnel": "node test/sauce.js -m", "start": "buster-static -e browser", "benchmark": "node benchmark/promise && node benchmark/map", + "prepublish": "npm run browserify-es6", + "preversion": "npm run browserify-es6", "browserify-es6": "browserify -s Promise es6-shim/Promise.browserify-es6.js --no-detect-globals -o es6-shim/Promise.js", "browserify": "browserify -s when build/when.browserify.js --no-detect-globals -o build/when.js", "browserify-debug": "browserify -s when build/when.browserify-debug.js --no-detect-globals -o build/when.js"