Skip to content

TypeError: Cannot read property 'invalidateSize' of null #9

@skyqrose

Description

@skyqrose

When clicking the control to go into or out of fullscreen, the error fires 3 or 4 times. map is null.

Unlike #6, this does occur in production, though it's not causing any user-facing problems beyond filling up the console with error messages.

Earlier today, it was happening every time I clicked the fullscreen control. Now it's not happening at all. I'm not sure what causes it to happen or not.

react-leaflet-fullscreen version 1.0.1
leafelt.fullscreen version 1.4.5

// node_modules/leaflet.fullscreen/Control.FullScreen.js line 89
_handleFullscreenChange: function () {
	var map = this._map;
	map.invalidateSize();
	if (!fullScreenApi.isFullScreen() && !map._exitFired) {
		map.fire('exitFullscreen');
		map._exitFired = true;
		map._isFullscreen = false;
	}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions