1
1
/** vim: et:ts=4:sw=4:sts=4
2
- * @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2
+ * @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
3
3
* Available via the MIT or new BSD license.
4
4
* see: http://github.com/jrburke/requirejs for details
5
5
*/
@@ -12,7 +12,7 @@ var requirejs, require, define;
12
12
( function ( global ) {
13
13
var req , s , head , baseElement , dataMain , src ,
14
14
interactiveScript , currentlyAddingScript , mainScript , subPath ,
15
- version = '2.1.8 ' ,
15
+ version = '2.1.9 ' ,
16
16
commentRegExp = / ( \/ \* ( [ \s \S ] * ?) \* \/ | ( [ ^ : ] | ^ ) \/ \/ ( .* ) $ ) / mg,
17
17
cjsRequireRegExp = / [ ^ . ] \s * r e q u i r e \s * \( \s * [ " ' ] ( [ ^ ' " \s ] + ) [ " ' ] \s * \) / g,
18
18
jsSuffixRegExp = / \. j s $ / ,
@@ -22,7 +22,7 @@ var requirejs, require, define;
22
22
hasOwn = op . hasOwnProperty ,
23
23
ap = Array . prototype ,
24
24
apsp = ap . splice ,
25
- isBrowser = ! ! ( typeof window !== 'undefined' && navigator && window . document ) ,
25
+ isBrowser = ! ! ( typeof window !== 'undefined' && typeof navigator !== 'undefined' && window . document ) ,
26
26
isWebWorker = ! isBrowser && typeof importScripts !== 'undefined' ,
27
27
//PS3 indicates loaded and complete, but need to wait for complete
28
28
//specifically. Sequence is 'loading', 'loaded', execution,
@@ -373,7 +373,6 @@ var requirejs, require, define;
373
373
function hasPathFallback ( id ) {
374
374
var pathConfig = getOwn ( config . paths , id ) ;
375
375
if ( pathConfig && isArray ( pathConfig ) && pathConfig . length > 1 ) {
376
- removeScript ( id ) ;
377
376
//Pop off the first array value, since it failed, and
378
377
//retry
379
378
pathConfig . shift ( ) ;
@@ -1464,6 +1463,8 @@ var requirejs, require, define;
1464
1463
var map = makeModuleMap ( id , relMap , true ) ,
1465
1464
mod = getOwn ( registry , id ) ;
1466
1465
1466
+ removeScript ( id ) ;
1467
+
1467
1468
delete defined [ id ] ;
1468
1469
delete urlFetched [ map . url ] ;
1469
1470
delete undefEvents [ id ] ;
@@ -1609,7 +1610,7 @@ var requirejs, require, define;
1609
1610
1610
1611
//Join the path parts together, then figure out if baseUrl is needed.
1611
1612
url = syms . join ( '/' ) ;
1612
- url += ( ext || ( / \? / . test ( url ) || skipExt ? '' : '.js' ) ) ;
1613
+ url += ( ext || ( / ^ d a t a \: | \? / . test ( url ) || skipExt ? '' : '.js' ) ) ;
1613
1614
url = ( url . charAt ( 0 ) === '/' || url . match ( / ^ [ \w \+ \. \- ] + : / ) ? '' : config . baseUrl ) + url ;
1614
1615
}
1615
1616
@@ -1918,7 +1919,7 @@ var requirejs, require, define;
1918
1919
}
1919
1920
1920
1921
//Look for a data-main script attribute, which could also adjust the baseUrl.
1921
- if ( isBrowser ) {
1922
+ if ( isBrowser && ! cfg . skipDataMain ) {
1922
1923
//Figure out baseUrl. Get it from the script tag with require.js in it.
1923
1924
eachReverse ( scripts ( ) , function ( script ) {
1924
1925
//Set the 'head' where we can append children by
0 commit comments