https://bugzilla.wikimedia.org/show_bug.cgi?id=31673

--- Comment #5 from Roan Kattouw <[email protected]> 2011-11-14 13:52:52 
UTC ---
(In reply to comment #4)
> (In reply to comment #2)
> > That's very strange. I wonder what the value of 'character' was in that 
> > case. 0
> > in character works fine if character is an array, and the "Object expected"
> > error only seems to appear in cases where Firefox also throws an error.
> 
> It's undefined.
> 
> I think it's caused by the stray comma at the end of line 752 in
> jquery.wikiEditor.toolbar.config.js
> 
Thanks for spotting that, removed in r102980. Deploying that now.

> That apparently makes IE8 add a 185th undefined element to the array.
> 
Well that's better than throwing a syntax error, which is what happens for
trailing commas in object definitions :(

> I think though, besides removing that comma, the function
> jquery.wikiEditor.toolbar.buildCharacter() should be made more robust by
> returning an empty string if typeof character == 'undefined'. Possibly log the
> error somewhere, but don't let such misconfigurations break the whole thing.
There should probably be a typeof foo != 'string' check yeah.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to