Reverting r2903, since it's not necessary, and, unless we decide to cast automatically in all the ZU functions, we should stay consistent

This commit is contained in:
Dan Stillman 2008-06-25 01:18:10 +00:00
parent 5a60ccc92a
commit dd78c85d73

View File

@ -156,16 +156,8 @@ Zotero.Utilities.prototype.cleanTags = function(x) {
* <ZOTEROHELLIP/> => &hellip;
*/
Zotero.Utilities.prototype.htmlSpecialChars = function(str) {
switch (typeof str) {
case 'string':
break;
case 'number':
str = str + '';
break;
default:
throw "Argument '" + str + "' must be a string in Zotero.Utilities.htmlSpecialChars()";
if (typeof str != 'string') {
throw "Argument '" + str + "' must be a string in Zotero.Utilities.htmlSpecialChars()";
}
if (!str) {