Skip to content

Commit

Permalink
Removed madeMap and getMapFromObject from LazyMap since it's unused
Browse files Browse the repository at this point in the history
  • Loading branch information
ms committed Oct 21, 2014
1 parent 819bb1a commit 8a163ce
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions map/lazy/lazy.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
steal('can/util', './bubble.js', 'can/map', 'can/list', './nested_reference.js', function (can, bubble) {

// A map that temporarily houses a reference
// to maps that have already been made for a plain ole JS object
var madeMap = null;
var getMapFromObject = function (obj) {
return madeMap && madeMap[obj._cid] && madeMap[obj._cid].instance;
};

can.LazyMap = can.Map.extend({
_bubble: bubble
}, {
Expand Down Expand Up @@ -121,11 +114,7 @@ steal('can/util', './bubble.js', 'can/map', 'can/list', './nested_reference.js',
__type: function(value, prop){
// If we are getting an object.
if (!( value instanceof can.LazyMap) && can.Map.helpers.canMakeObserve(value) ) {

var cached = getMapFromObject(value);
if(cached) {
return cached;
}

if( can.isArray(value) ) {
var List = can.LazyList;
return new List(value);
Expand Down

0 comments on commit 8a163ce

Please sign in to comment.