File tree 1 file changed +8
-16
lines changed
1 file changed +8
-16
lines changed Original file line number Diff line number Diff line change 1317
1317
return template ;
1318
1318
} ;
1319
1319
1320
- // Add a "chain" function, which will delegate to the wrapper .
1320
+ // Add a "chain" function. Start chaining a wrapped Underscore object .
1321
1321
_ . chain = function ( obj ) {
1322
- return _ ( obj ) . chain ( ) ;
1322
+ var instance = _ ( obj ) ;
1323
+ instance . _chain = true ;
1324
+ return instance ;
1323
1325
} ;
1324
1326
1325
1327
// OOP
1367
1369
} ;
1368
1370
} ) ;
1369
1371
1370
- _ . extend ( _ . prototype , {
1371
-
1372
- // Start chaining a wrapped Underscore object.
1373
- chain : function ( ) {
1374
- this . _chain = true ;
1375
- return this ;
1376
- } ,
1377
-
1378
- // Extracts the result from a wrapped and chained object.
1379
- value : function ( ) {
1380
- return this . _wrapped ;
1381
- }
1382
-
1383
- } ) ;
1372
+ // Extracts the result from a wrapped and chained object.
1373
+ _ . prototype . value = function ( ) {
1374
+ return this . _wrapped ;
1375
+ } ;
1384
1376
1385
1377
// AMD registration happens at the end for compatibility with AMD loaders
1386
1378
// that may not enforce next-turn semantics on modules. Even though general
You can’t perform that action at this time.
0 commit comments