Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #145 #146

Merged
merged 2 commits into from
Aug 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ define(
* - 如果该方法正常返回,则认为错误已经处理完毕,继续进入下一步
* - 如果该方法抛出异常,则认为错误未处理,中断执行流程
*
* @param {Object[]} 错误集合
* @param {Object[]} errors 错误集合
* @ignore
*/
exports.handleError = function (errors) {
Expand Down
10 changes: 7 additions & 3 deletions src/Deferred.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ define(
var assert = require('./assert');

var setImmediate = typeof window.setImmediate === 'function'
? function (fn) { window.setImmediate(fn); }
: function (fn) { window.setTimeout(fn, 0); };
? function (fn) {
window.setImmediate(fn);
}
: function (fn) {
window.setTimeout(fn, 0);
};

/**
* 尝试执行相关的回调函数
Expand Down Expand Up @@ -64,7 +68,7 @@ define(
*
* @param {Deferred} original 原`Deferred`对象
* @param {Deferred} deferred 新`Deferred`对象
* @param {callback} 当`original`运行完毕后,需要执行的函数
* @param {Function} callback 当`original`运行完毕后,需要执行的函数
* @param {string} actionType 关联的动作类型,`"resolve"`或`"reject"`
* @return {Function} 关联函数,可注册在`original`的相关回调函数上
* @ignore
Expand Down
Loading