This repository has been archived by the owner on Nov 6, 2024. It is now read-only.
Preloading a specific versions of the JSAPI forces consumers to pass same url to loadModules() #51
Labels
Milestone
Kind of an edge case here, but if you pass a specific JSAPI version when preloading (i.e.
loadScript({ url: 'https://js.arcgis.com/3.22' })
) then you have to make sure that subsequent calls toloadModules()
include that sameurl
option. If you don't, and the JSAPI hasn't loaded by the timeloadModules()
is called, it will try to lazy load the default version (latest 4.x) and it will reject with an error.One solution is to just document the above.
Another idea would be to cache url that it's attempting to load the first time
loadScript()
is called and then default to that (instead of latest 4.x) for subsequent calls - either at theloadModules()
orloadScript()
level.The text was updated successfully, but these errors were encountered: