Skip to content

Commit

Permalink
0.4.2: bugfix
Browse files Browse the repository at this point in the history
fix missing NProgress.done() when request failed.
  • Loading branch information
guo-yu committed Aug 14, 2014
1 parent a0a0939 commit f89c1d0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "duoshuo",
"version": "0.4.1",
"version": "0.4.2",
"authors": [
"turing <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/duoshuo.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/duoshuo.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-duoshuo",
"version": "0.4.1",
"version": "0.4.2",
"description": "a duoshuo SDK for angular.js, pure front-end, cross-domain request supported.",
"main": "dist/duoshuo.min.js",
"scripts": {
Expand Down
8 changes: 7 additions & 1 deletion src/duoshuo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
);
if (!skipCheck) $rootScope.$apply();
return;
}, errorCallback);
}, function(err) {
if (NProgressExist) NProgress.done();
if (errorCallback && typeof(errorCallback) === 'function') {
return errorCallback(err);
}
return;
});
}
});

Expand Down

0 comments on commit f89c1d0

Please sign in to comment.