We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a428c commit 336ce2bCopy full SHA for 336ce2b
src/ua-parser.js
@@ -91,7 +91,7 @@
91
},
92
trim = function (str, len) {
93
if (typeof(str) === STR_TYPE) {
94
- str = str.replace(/^\s+|\s+$/g, EMPTY);
+ str = str.replace(/^\s\s*/, EMPTY).replace(/\s\s*$/, EMPTY);
95
return typeof(len) === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
96
}
97
};
0 commit comments