Skip to content

Commit f89c1d0

Browse files
committed
0.4.2: bugfix
fix missing NProgress.done() when request failed.
1 parent a0a0939 commit f89c1d0

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "duoshuo",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"authors": [
55
"turing <[email protected]>"
66
],

dist/duoshuo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/duoshuo.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-duoshuo",
3-
"version": "0.4.1",
3+
"version": "0.4.2",
44
"description": "a duoshuo SDK for angular.js, pure front-end, cross-domain request supported.",
55
"main": "dist/duoshuo.min.js",
66
"scripts": {

src/duoshuo.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@
2525
);
2626
if (!skipCheck) $rootScope.$apply();
2727
return;
28-
}, errorCallback);
28+
}, function(err) {
29+
if (NProgressExist) NProgress.done();
30+
if (errorCallback && typeof(errorCallback) === 'function') {
31+
return errorCallback(err);
32+
}
33+
return;
34+
});
2935
}
3036
});
3137

0 commit comments

Comments
 (0)