MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / hasPathFallback

Function hasPathFallback

public/javascripts/require.js:368–384  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

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