Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
fixed error.stack in noOp
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Jun 22, 2016
1 parent dce4cf0 commit c8a9589
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -2,7 +2,7 @@
"name": "thunks",
"description": "A small and magical composer for all JavaScript asynchronous.",
"main": "thunks.js",
"version": "4.2.1",
"version": "4.2.2",
"homepage": "https://github.com/thunks/thunks",
"authors": [
"Yan Qing <admin@zensh.com>"
Expand Down
2 changes: 1 addition & 1 deletion component.json
Expand Up @@ -2,7 +2,7 @@
"name": "thunks",
"description": "A small and magical composer for all JavaScript asynchronous.",
"main": "thunks.js",
"version": "4.2.1",
"version": "4.2.2",
"homepage": "https://github.com/thunks/thunks",
"authors": [
"Yan Qing <admin@zensh.com>"
Expand Down
12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -4,7 +4,7 @@
"authors": [
"Yan Qing <admin@zensh.com>"
],
"version": "4.2.1",
"version": "4.2.2",
"main": "thunks.js",
"typings": "./thunks.d.ts",
"jsnext:main": "thunks.es6.js",
Expand All @@ -31,14 +31,14 @@
"dependencies": {},
"devDependencies": {
"async": "^1.5.2",
"bluebird": "^3.4.0",
"bluebird": "^3.4.1",
"co": "^4.6.0",
"istanbul": "^0.4.3",
"istanbul": "^0.4.4",
"jsbench": "^1.0.0",
"should": "^8.3.2",
"standard": "^7.1.0",
"should": "^9.0.2",
"standard": "^7.1.2",
"thenjs": "^2.0.3",
"tman": "^0.9.6"
"tman": "^0.9.9"
},
"scripts": {
"test": "standard && tman test/index",
Expand Down
6 changes: 3 additions & 3 deletions test/generator.js
@@ -1,8 +1,8 @@
'use strict'

var tman = require('tman')
var should = require('should')
var thunks = require('..')
const tman = require('tman')
const should = require('should')
const thunks = require('..')

tman.suite('thunk with generator', function () {
tman.it('yield any value', function (done) {
Expand Down
3 changes: 2 additions & 1 deletion thunks.es6.js
Expand Up @@ -344,6 +344,7 @@ function isGeneratorFunction (fn) {
function noOp (error) {
if (error == null) return
/* istanbul ignore next */
error = pruneErrorStack(error)
nextTick(() => {
if (isFunction(thunks.onerror)) thunks.onerror(error)
else throw error
Expand All @@ -358,7 +359,7 @@ function pruneErrorStack (error) {
}

thunks.NAME = 'thunks'
thunks.VERSION = '4.2.1'
thunks.VERSION = '4.2.2'
thunks.strictMode = true
thunks.pruneErrorStack = true
export default thunks
3 changes: 2 additions & 1 deletion thunks.js
Expand Up @@ -379,6 +379,7 @@
function noOp (error) {
if (error == null) return
/* istanbul ignore next */
error = pruneErrorStack(error)
nextTick(function () {
if (isFunction(thunks.onerror)) thunks.onerror(error)
else throw error
Expand All @@ -393,7 +394,7 @@
}

thunks.NAME = 'thunks'
thunks.VERSION = '4.2.1'
thunks.VERSION = '4.2.2'
thunks.strictMode = true
thunks['default'] = thunks
thunks.pruneErrorStack = true
Expand Down

0 comments on commit c8a9589

Please sign in to comment.