commit 8e9b5e6d361dffd48c09597b2520d66f187663b6 parent d61914f8c71978da236a297eb5bb91a138d65cf8 Author: Dan Stillman <dstillman@zotero.org> Date: Wed, 25 Jun 2008 01:18:10 +0000 Reverting r2903, since it's not necessary, and, unless we decide to cast automatically in all the ZU functions, we should stay consistent Diffstat:
| M | chrome/content/zotero/xpcom/utilities.js | | | 12 | ++---------- |
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -156,16 +156,8 @@ Zotero.Utilities.prototype.cleanTags = function(x) { * <ZOTEROHELLIP/> => … */ 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) {