can-view-scope.js
function(context, keys){

				// If nothing can be found with the keys we are looking for, save the
				// first possible match.  This is where we will write to.
				if(firstSearchedContext === undefined && !(context instanceof LetContext)) {
					firstSearchedContext = context;
				}
				// If we have multiple keys ...
				if(keys.length > 1) {
					// see if we can find the parent ...
					var parentKeys = keys.slice(0, keys.length-1);
					var parent = stacheKey.read(context, parentKeys, options).value;

					// If there is a parent, see if it has the last key
					if( parent != null && canReflect.hasKey(parent, keys[keys.length-1].key ) ) {
						return {
							parent: parent,
							parentHasKey: true,
							value: undefined
						};
					} else {
						return {};
					}
				}
				// If we have only one key, try to find a context with this key
				else if(keys.length === 1) {
					if( canReflect.hasKey(context, keys[0].key ) ) {
						return {
							parent: context,
							parentHasKey: true,
							value: undefined
						};
					} else {
						return {};
					}
				}
				// If we have no keys, we are reading `this`.
				else {
					return {
						value: context
					};
				}
			}
function(context, keys){

				// If nothing can be found with the keys we are looking for, save the
				// first possible match.  This is where we will write to.
				if(firstSearchedContext === undefined && !(context instanceof LetContext)) {
					firstSearchedContext = context;
				}
				// If we have multiple keys ...
				if(keys.length > 1) {
					// see if we can find the parent ...
					var parentKeys = keys.slice(0, keys.length-1);
					var parent = stacheKey.read(context, parentKeys, options).value;

					// If there is a parent, see if it has the last key
					if( parent != null && canReflect.hasKey(parent, keys[keys.length-1].key ) ) {
						return {
							parent: parent,
							parentHasKey: true,
							value: undefined
						};
					} else {
						return {};
					}
				}
				// If we have only one key, try to find a context with this key
				else if(keys.length === 1) {
					if( canReflect.hasKey(context, keys[0].key ) ) {
						return {
							parent: context,
							parentHasKey: true,
							value: undefined
						};
					} else {
						return {};
					}
				}
				// If we have no keys, we are reading `this`.
				else {
					return {
						value: context
					};
				}
			}
function ( context , keys ) { // If nothing can be found with the keys we are looking for, save the // first possible match.  This is where we will write to. if ( firstSearchedContext === undefined && ! ( context instanceof LetContext ) ) { firstSearchedContext = context ; } // If we have multiple keys ... if ( keys . length > 1 ) { // see if we can find the parent ... var parentKeys = keys . slice ( 0 , keys . length - 1 ) ; var parent = stacheKey . read ( context , parentKeys , options ) . value ; // If there is a parent, see if it has the last key if ( parent != null && canReflect . hasKey ( parent , keys [ keys . length - 1 ] . key ) ) { return { parent : parent , parentHasKey : true , value : undefined } ; } else { return { } ; } } // If we have only one key, try to find a context with this key else if ( keys . length === 1 ) { if ( canReflect . hasKey ( context , keys [ 0 ] . key ) ) { return { parent : context , parentHasKey : true , value : undefined } ; } else { return { } ; } } // If we have no keys, we are reading `this`. else { return { value : context } ; } }
This read is used by `._walk` to read from the scope. This will use `hasKey` on the last property instead of reading it.
This read is used by . _walk to read from the scope . This will use hasKey on the last property instead of reading it .