Search code examples
javascriptleafletleaflet.markerclustergoogle-identity

Google One-tap declares global variable L


The Google One-tap library causes errors when used with other libraries because it declares a global variable L.

I see this in the minified code but I am not sure what it is doing.

var L = 0;
function K(g) {
  return "jscomp_symbol_" + (g || "") + L++
}

That conflicts with other libraries like LeafletJS that also define a global L https://github.com/Leaflet/Leaflet

I can't find an open source project for Google's One-tap code to submit a patch. How do I work around this?


Solution

  • I'm the product manager at Google for this library. This should be fixed now. Sorry about that and thanks for the patience.