tcoopman

new GraphicsLayer(null) fails in 3.9

Discussion created by tcoopman on Apr 9, 2014
Latest reply on Apr 17, 2014 by tyndallt_esri
When running this code in 3.9:

var l = new GraphicsLayer(null)


In 3.9 you get this error:

TypeError {stack: "TypeError: Cannot read property 'plugins' of undef???esolve (http://js.arcgis.com/3.9/init.js:197:441)", message: "Cannot read property 'plugins' of undefined"}
 "TypeError: Cannot read property 'plugins' of undefined
    at http://js.arcgis.com/3.9/init.js:1005:336
    at Object.some (http://js.arcgis.com/3.9/init.js:224:133)
    at g._pluginsHandler (http://js.arcgis.com/3.9/init.js:1005:305)
    at h.(anonymous function).g (http://js.arcgis.com/3.9/init.js:239:390)
    at new <anonymous> (http://js.arcgis.com/3.9/init.js:105:288)


In 3.8 this worked just fine. Solving this is easy of course (don't pass null to the GraphicsLayer).

Outcomes