@@ -8,7 +8,8 @@ function patchEmberApp(emberApp) {
88 if ( emberApp . addonPreconcatTree ) { return ; }
99
1010 // Save off original implementation of the `concatFiles` hook
11- var originalConcatFiles = emberApp . concatFiles ;
11+ var concatDeprecated = emberApp . _concatFiles !== undefined ;
12+ var originalConcatFiles = concatDeprecated ? emberApp . _concatFiles : emberApp . concatFiles ;
1213
1314 // Install method to invoke `preconcatTree` hook on each addon
1415 emberApp . addonPreconcatTree = addonPreconcatTree ;
@@ -17,12 +18,18 @@ function patchEmberApp(emberApp) {
1718 // and, if it detects that it's a concat for the app tree, invokes our
1819 // preconcat hook. Afterwards, we invoke the original implementation to
1920 // return a tree concating the files.
20- emberApp . concatFiles = function ( tree , options ) {
21+ var concatFiles = function ( tree , options ) {
2122 if ( options . annotation === 'Concat: App' ) {
2223 tree = this . addonPreconcatTree ( tree ) ;
2324 }
2425 return originalConcatFiles . apply ( this , arguments ) ;
2526 } ;
27+ if ( concatDeprecated ) {
28+ emberApp . _concatFiles = concatFiles ;
29+ } else {
30+ emberApp . concatFiles = concatFiles ;
31+ }
32+
2633}
2734
2835function addonPreconcatTree ( tree ) {
0 commit comments