Skip to content

Commit 76b19ba

Browse files
committed
Merge pull request #95 from meilixie/trim_err
fixed trim in IE7 explore err
2 parents 945da67 + 1027a65 commit 76b19ba

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

demo/js/qiniu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function QiniuJsSDK() {
223223
};
224224

225225
this.trim = function(text) {
226-
return text === null ? "" : this.trim.call(text);
226+
return text === null ? "" : text.replace(/^\s+|\s+$/g, '');
227227
};
228228

229229
//Todo ie7 handler / this.parseJSON bug;

src/qiniu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function QiniuJsSDK() {
223223
};
224224

225225
this.trim = function(text) {
226-
return text === null ? "" : this.trim.call(text);
226+
return text === null ? "" : text.replace(/^\s+|\s+$/g, '');
227227
};
228228

229229
//Todo ie7 handler / this.parseJSON bug;

0 commit comments

Comments
 (0)