Dash-leaflet when initialize map container using bounds instead of center+zoom causes Uncaught TypeError

Below is the minimal app that can reproduce the error

from dash import Dash, html
import dash_leaflet as dl

map1 = dl.Map(dl.TileLayer(url="https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png",attribution='&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, &copy; <a href="https://carto.com/attributions">CARTO</a>'),
                    bounds=[[34.373519,-119.954389],[34.491573,-119.445500]], style={'height': '50vh'},id="map")

app = Dash()
app.layout = html.Div([map1])

if __name__ == '__main__':
    app.run_server()

In Chrome developer tool, the following Uncaught TypeError message will be shown

Such an error message will not be shown if I replace bounds with center=[34.432546, -119.699944], zoom=11

The app runs all right with the error message as far as I observe, but it is frustrating a lot of such messages got generated as I work on creating the app

It looks like a bug in the dash-leaflet, probably something to do with the initialization order. If you post a bug report on github, I’ll take a look when I get some time on my hands :slight_smile: