@@ -269,18 +269,18 @@ var Mustache = function() {
269
269
}
270
270
271
271
var value ;
272
-
273
- // check for dot notation eg. foo.bar
274
- if ( name . match ( / ( [ a - z _ ] + ) \. / ig) ) {
275
- value = is_kinda_truthy ( this . walk_context ( name , context ) ) ;
276
- }
277
- else {
278
- if ( is_kinda_truthy ( context [ name ] ) ) {
279
- value = context [ name ] ;
280
- } else if ( is_kinda_truthy ( this . context [ name ] ) ) {
281
- value = this . context [ name ] ;
282
- }
283
- }
272
+
273
+ // check for dot notation eg. foo.bar
274
+ if ( name . match ( / ( [ a - z _ ] + ) \. / ig) ) {
275
+ value = is_kinda_truthy ( this . walk_context ( name , context ) ) ;
276
+ }
277
+ else {
278
+ if ( is_kinda_truthy ( context [ name ] ) ) {
279
+ value = context [ name ] ;
280
+ } else if ( is_kinda_truthy ( this . context [ name ] ) ) {
281
+ value = this . context [ name ] ;
282
+ }
283
+ }
284
284
285
285
if ( typeof value === "function" ) {
286
286
return value . apply ( context ) ;
@@ -292,21 +292,21 @@ var Mustache = function() {
292
292
return "" ;
293
293
} ,
294
294
295
- walk_context : function ( name , context ) {
296
- var path = name . split ( '.' ) ;
297
- // if the var doesn't exist in current context, check the top level context
298
- var value_context = ( context [ path [ 0 ] ] != undefined ) ? context : this . context ;
299
- var value = value_context [ path . shift ( ) ] ;
300
- while ( value != undefined && path . length > 0 ) {
301
- value_context = value ;
302
- value = value [ path . shift ( ) ] ;
303
- }
304
- // if the value is a function, call it, binding the correct context
305
- if ( typeof value === "function" ) {
295
+ walk_context : function ( name , context ) {
296
+ var path = name . split ( '.' ) ;
297
+ // if the var doesn't exist in current context, check the top level context
298
+ var value_context = ( context [ path [ 0 ] ] != undefined ) ? context : this . context ;
299
+ var value = value_context [ path . shift ( ) ] ;
300
+ while ( value != undefined && path . length > 0 ) {
301
+ value_context = value ;
302
+ value = value [ path . shift ( ) ] ;
303
+ }
304
+ // if the value is a function, call it, binding the correct context
305
+ if ( typeof value === "function" ) {
306
306
return value . apply ( value_context ) ;
307
307
}
308
- return value ;
309
- } ,
308
+ return value ;
309
+ } ,
310
310
311
311
// Utility methods
312
312
@@ -416,4 +416,4 @@ var Mustache = function() {
416
416
}
417
417
}
418
418
} ) ;
419
- } ( ) ;
419
+ } ( ) ;
0 commit comments