Leaflet/Leaflet — pull request #1279 by oslek (2013-01-14 22:28:29+00:00)
Title: Robust array type check for cross-frame support

In a multi-frame DOM environment, if setView is called with an array for
the first parameter, a subsequent call to getBounds raises "Invalid
LatLng object" exception. This is the case if the array passed to
setView was created outside the iFrame that contains the map. It causes
the array test using "instanceof" in L.latLng to fail, and
_initialTopLeftPoint to not being properly initialized.

Thank you to Juriy Zaytsev for the full explaination:
http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
John Resig and Dean Edwards post comments and concur.