@@ -29,47 +29,57 @@ module.exports = function() {
29
29
} ;
30
30
for ( var name in $require$ ) {
31
31
if ( Object . prototype . hasOwnProperty . call ( $require$ , name ) ) {
32
- Object . defineProperty ( fn , name , ( function ( name ) {
33
- return {
34
- configurable : true ,
35
- enumerable : true ,
36
- get : function ( ) {
37
- return $require$ [ name ] ;
38
- } ,
39
- set : function ( value ) {
40
- $require$ [ name ] = value ;
41
- }
42
- } ;
43
- } ( name ) ) ) ;
32
+ if ( Object . defineProperty ) {
33
+ Object . defineProperty ( fn , name , ( function ( name ) {
34
+ return {
35
+ configurable : true ,
36
+ enumerable : true ,
37
+ get : function ( ) {
38
+ return $require$ [ name ] ;
39
+ } ,
40
+ set : function ( value ) {
41
+ $require$ [ name ] = value ;
42
+ }
43
+ } ;
44
+ } ( name ) ) ) ;
45
+ } else {
46
+ fn [ name ] = $require$ [ name ] ;
47
+ }
44
48
}
45
49
}
46
- Object . defineProperty ( fn , "e" , {
47
- enumerable : true ,
48
- value : function ( chunkId , callback ) {
49
- if ( hotStatus === "ready" )
50
- hotSetStatus ( "prepare" ) ;
51
- hotChunksLoading ++ ;
52
- $require$ . e ( chunkId , function ( ) {
53
- try {
54
- callback . call ( null , fn ) ;
55
- } finally {
56
- finishChunkLoading ( ) ;
57
- }
58
50
59
- function finishChunkLoading ( ) {
60
- hotChunksLoading -- ;
61
- if ( hotStatus === "prepare" ) {
62
- if ( ! hotWaitingFilesMap [ chunkId ] ) {
63
- hotEnsureUpdateChunk ( chunkId ) ;
64
- }
65
- if ( hotChunksLoading === 0 && hotWaitingFiles === 0 ) {
66
- hotUpdateDownloaded ( ) ;
67
- }
51
+ function ensure ( chunkId , callback ) {
52
+ if ( hotStatus === "ready" )
53
+ hotSetStatus ( "prepare" ) ;
54
+ hotChunksLoading ++ ;
55
+ $require$ . e ( chunkId , function ( ) {
56
+ try {
57
+ callback . call ( null , fn ) ;
58
+ } finally {
59
+ finishChunkLoading ( ) ;
60
+ }
61
+
62
+ function finishChunkLoading ( ) {
63
+ hotChunksLoading -- ;
64
+ if ( hotStatus === "prepare" ) {
65
+ if ( ! hotWaitingFilesMap [ chunkId ] ) {
66
+ hotEnsureUpdateChunk ( chunkId ) ;
67
+ }
68
+ if ( hotChunksLoading === 0 && hotWaitingFiles === 0 ) {
69
+ hotUpdateDownloaded ( ) ;
68
70
}
69
71
}
70
- } ) ;
71
- }
72
- } ) ;
72
+ }
73
+ } ) ;
74
+ }
75
+ if ( Object . defineProperty ) {
76
+ Object . defineProperty ( fn , "e" , {
77
+ enumerable : true ,
78
+ value : ensure
79
+ } ) ;
80
+ } else {
81
+ fn . e = ensure ;
82
+ }
73
83
return fn ;
74
84
}
75
85
0 commit comments