Commit cce57d50 authored by Juan Gomez's avatar Juan Gomez
Browse files

Prevent unhandled error rejections

parent 4d2c9ba8
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -224,7 +224,14 @@ export default {
        latLng,
        DomEvent,
      } = WINDOW_OR_GLOBAL.L;

      try {
        options.beforeMapMount && (await options.beforeMapMount());
      } catch (error) {
        console.error(
          `The following error occurred running the provided beforeMapMount hook ${error.message}`
        );
      }

      await resetWebpackIcon(Icon);
      options.crs = options.crs || CRS.EPSG3857;