MCPcopy
hub / github.com/requirejs/requirejs / hasPathFallback

Function hasPathFallback

require.js:370–386  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

368 }
369
370 function hasPathFallback(id) {
371 var pathConfig = getOwn(config.paths, id);
372 if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
373 //Pop off the first array value, since it failed, and
374 //retry
375 pathConfig.shift();
376 context.require.undef(id);
377
378 //Custom require that does not do map translation, since
379 //ID is "absolute", already mapped/resolved.
380 context.makeRequire(null, {
381 skipMap: true
382 })([id]);
383
384 return true;
385 }
386 }
387
388 //Turns a plugin!resource to [plugin, resource]
389 //with the plugin being undefined if the name

Callers 2

checkLoadedFunction · 0.85
newContextFunction · 0.85

Calls 2

getOwnFunction · 0.85
isArrayFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…