Page MenuHomePhabricator

GoogleMaps tries to add icon to toolbar, without checking it exist
Closed, ResolvedPublic

Description

Author: c.stafford

Description:
changes the inline js to test for the existence of toolbar before doing add

in GoogleMaps.body.php around line 284ish, there is a call to document.getElementById('toolbar').appendChild(image);

when editing a User:USERNAME/skin.js page, the toolbar is suppressed (for whatever reason), and does not exist, so the above call fails, and dumps a javascript error into ye olde browser's error reporting console.
ex: Error: document.getElementById("toolbar") is null

i've added a patch file to attempt to check that it exists, then adds it if it is present.

i created the file out of wikia's svn, as thats what i had handy.
the linenumbers likely wont match, nor the version numbers, as the two versions arent entirely in sync, but the differences are minor and not relevant to this section of code.

i'll be fixing this in wikia's version shortly, just thought i'd share the fix upstream.


Version: unspecified
Severity: minor

Attached:

Details

Reference
bz20970