This is from around lin 3255 of dojo.js.  The line a commented out was
throwing an exception.  I replaced it with my proposed fix and it is working
fine.

Am I missing something or is this the correct fix?

Thanks,

David

/** Uppercases the first letter of each word */
dojo.string.capitalize = function (str) {
        if (!dojo.lang.isString(str)) { return ""; }
        if (arguments.length == 0) { str = this; }

        var words = str.split(' ');
        for (i = 0; i < words.length; i++){     // This is my proposed fix
// BAD? for(var i in words){
                words[i] = words[i].charAt(0).toUpperCase() +
words[i].substring(1);
        }
        return words.join(" ");
}



_______________________________________________
Tacos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tacos-devel

Reply via email to