function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tom WrightTom Wright 

Salesforce DX unit broken in Firefox because of Locker Service

I'm following the Salesforce DX unit "Build the account map display"

When I add the map component and refresh the tab, I get the following error:
 
[cannot use the given object as a weak map key]
n()@https://inspiration-speed-2230-dev-ed.lightning.force.com/auraFW/javascript/1bO4dJePbDnoI-_VdhdsEQ/aura_prod.js:4:277
a()@https://inspiration-speed-2230-dev-ed.lightning.force.com/auraFW/javascript/1bO4dJePbDnoI-_VdhdsEQ/aura_prod.js:4:403
get/<()@https://inspiration-speed-2230-dev-ed.lightning.force.com/auraFW/javascript/1bO4dJePbDnoI-_VdhdsEQ/aura_prod.js:24:77433
{anonymous}()@https://inspiration-speed-2230-dev-ed.lightning.force.com/resource/leaflet/leaflet.js:17:25431
{anonymous}()@https://inspiration-speed-2230-dev-ed.lightning.force.com/resource/leaflet/leaflet.js:17:140
{anonymous}()@https://inspiration-speed-2230-dev-ed.lightning.force.com/resource/leaflet/leaflet.js:17:2
{anonymous}()@https://inspiration-speed-2230-dev-ed.lightning.force.com/resource/leaflet/leaflet.js:11:2
{anonymous}()@https://inspiration-speed-2230-dev-ed.lightning.force.com/resource/leaflet/leaflet.js:7:17

From some cursory Googling, this seems to be related to the new Locker Service not working in Firefox.

Because Locker Services can't be disabled in orgs created in 2018, this unit may need updating.

Notes:

  • I don't get this error in Chrome
  • I've tried using both the latest version of Leaflet and the version referenced in the text (1.2.0)