Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function initIdEditor () {
if (!rootRef.current) return
updateSettings()
var serverUrl = 'http://' + remote.getGlobal('osmServerHost')
id.current = window.id = iD
.coreContext()
.assetPath('node_modules/id-mapeo/dist/')
.preauth({ url: serverUrl })
.minEditableZoom(window.localStorage.getItem('minEditableZoom') || 14)
if (!customDefs.current) {
customDefs.current = id.current
.container()
.append('svg')
.style('position', 'absolute')
.style('width', '0px')
.style('height', '0px')
.attr('id', 'custom-defs')
.append('defs')
customDefs.current.append('svg')